Field Operations in Tableau

Tableau provides many features to perform and manipulate the data fields in Tableau workspace, In the same way, we can rename, combine, or create a field using the filed operation feature.

These operations help in better organization of the dimension and measure variables and also helps in accommodating two or more fields with the same name for better data analysis.

The field operation includes the following operations :

  1. Adding Field to Worksheet in Tableau
  2. Combining Two Fields
  3. Set of Two Fields
  4. Grouping of fields

Tableau Data Relationship

Adding Field to Worksheet in Tableau

You can add any field to the Tableau worksheet by right-clicking and pick the choice to add to the sheet. You can also drag and drop the fields into different shelves present in the worksheet, like Columns shelf, Rows shelf, Filters shelf, and many other shelves under the Marks card.

  • Open Tableau and click on Connect to Data.
    connect-to-data-tableau
  • Then the Connect page will open, click on Microsoft Excel.
    click-on-connect-to-data-excel-file-tableau
  • Navigate to the downloaded files, select Sample Superstore.xls excel file, which is a saved excel file, and click on Open.
    connect-sample-superstore-to-tableau
  • You can download a Sample Superstore.xls file from the given link: https://chercher.tech/files/
  • Once the data source has been connected, open a new worksheet by clicking on sheet1.
    naviagte-to-sheet1-tableau
  • The Sample Superstore excel file contains the below details.
    sample-superstore-excel-file-tableau
  • Right-click on any of the fields either from dimension or from measure side, and then select add to sheet opinion from the dropdown.
    right-click-on-filed-and-select-add-to-sheet-tableau
  • Now, you can see that the Customer ID has been added to the row shelf as below.
    customer-id-added-to-row-shelf-tableau

Tableau Dashboards

Combining Two Fields in Tableau

You can combine two-dimension or two-measurement fields to create one field. The combined field has a name that is a combination of the individual fields.

  • Open Tableau and click on Connect to Data.
    connect-to-data-tableau
  • Then the Connect page will open, click on Microsoft Excel.
    click-on-connect-to-data-excel-file-tableau
  • Navigate to the downloaded files, select Sample Superstore excel file, which is a saved excel file, and click on Open.
    connect-sample-superstore-to-tableau
  • You can download a Sample Superstore.xls file from the link: https://chercher.tech/files/
  • The Sample Superstore excel file contains the below details.
    sample-superstore-excel-file-tableau
  • Once the data source has been connected, open a new worksheet by clicking on sheet1.
    naviagte-to-sheet1-tableau
  • Now, press the control button and select two or fields from either the dimension field or from the measure field.
  • Right-click on any field and select the combined field under the create option as below.
    select-cobined-fields-tableau
  • Now, you can see that the values in the dimension will get combined to a single value by joining the two strings into one string separated by a comma.
    combined-fields-separated-by-comma-tableau
  • And, you can change this default name by using the rename field operation as shown below.
    rename-field-name-tableau
  • The new field name has been updated as shown below.
    new-field-name-updated-tableau

Formatting in Tableau

Creating Set of Fields in Tableau

Sets are basically custom fields that are a subset of data that is created based on some conditions. If a data field is having some similar data that can be combined and sort to our convince then we can use the set option, this can be done dynamically as below.

  • Open Tableau and click on Connect to Data.
    connect-to-data-tableau
  • Then the Connect page will open, click on Microsoft Excel.
    click-on-connect-to-data-excel-file-tableau
  • Navigated to the downloaded files, select Sample Superstore.xls excel file, which is a saved excel file, and click on Open.
    connect-sample-superstore-to-tableau
  • You can download a Sample Superstore.xls excel file from the link: https://chercher.tech/files/
  • The Sample Superstore.xls excel file contains the below details.
    sample-superstore-excel-file-tableau
  • Once the fields are uploaded, create a sample bar chart by dragging the Sub-Category to the column shelf and sale to the row shelf as below.
    simple-bar-chart-with-tableau
  • I have arranged the field values in descending order by clicking on the sales pane as below.
    sorting-in-descending-order-by-sum-of-sales-with-sub-category
  • I am going to create a set of Sub-Category with lower sales rates, right-click and select the elements on the graph and hover on any of the selected fields for few seconds, you will find a tooltip window as below.
    selected-fields-from-graph-tableau
  • Next click on the create set button to create a set.
    tooltip-window-with-craete-set-button-tableau
  • Once you click on the create set button, the create set window will open, select the fields which you want to create a set, and click on Ok.
  • By default, the set name is given as Sub_category set, if you want you can rename it
    craeting-new-set-tableau
  • The new field called Sub-category set has been created under dimension, you can drag this to the color shelf to differentiate between actual sub-category elements and new set elements.
  • The In icon represents the elements which are present inside the set and with different color and the Out icon represents the elements which are not in a set with gray color as below.
    set-and-non-set-elements-tableau

Scatter plot in Tableau

Grouping of Fields in Tableau

Grouping in Tableau is a process of grouping multiple members/values into several groups which will create a higher category of the dimension.

  • Open Tableau and click on Connect to Data.
    connect-to-data-tableau
  • Then the Connect page will open, click on Microsoft Excel.
    click-on-connect-to-data-excel-file-tableau
  • Navigated to the downloaded files, select Sample Superstore.xls excel file, which is a saved excel file, and click on Open.
    connect-sample-superstore-to-tableau
  • You can download a Sample Superstore.xls text file and excel file from the link: https://chercher.tech/files/
  • The Sample Superstore.xls excel file contains the below details.
    sample-superstore-excel-file-tableau
  • Here I used to create a group with Sub-category.
  • Lets us drag the Sub-Category to the row shelf, So you can see that what are all the categories are present in the Sub-category as below.
    sub-category-data-fields-tableau
  • Let’s go ahead and hold CTRL and select all the values we want to be in the first group.
  • In this first group, I want to group the values Bookcases, Chairs, Furnishings, and Tables.
  • Once all of them are highlighted hover over one of the selected values and click on the paperclip that shows up in the dialog box.
    creating-a-group-of-sub-category-tableau
  • When we click on Group Members, Tableau will automatically create a new dimension adding (group) at the end of the name as below.
    sub-category-with-group-has-created-tableau
  • It is important to know that Tableau does not do anything to the original dimension, it is creating a new dimension based on how you are grouping values in the original dimension.
  • Now we have created the first group, let us go ahead and create another group by holding CTRL and selecting Appliances, Art, Binders, Envelopes, Fasteners.
    creating-second-group-tableau
  • In the same way, we are creating another group by selecting Labels, Paper, Storage, and Supplies.
    creating-third-group-tableau
  • Lastly, let's group all the other values together by using the same method. In the end, it should look like this.
    four-groups-tableau
  • Now we have all of our groupings completed we need to rename them, that will make sense.
  • Let's right-click on one of the new grouping values and click Edit Alias.
    rename-accessories-tableau
  • Once you click Edit Alias, will open a box where you can rename the value of that group.
    renaming-group-into-accessories-tableau
  • In the same way, change the name of all the groups you have created.
    renamed-all-four-groups-tableau
  • Let us add the original Sub-Category dimension back to the rows so we can see how everything turned out as below.
    groups-with-sub-categories-tableau
0 results
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions