Tableau Sort Data
Data present in the worksheet can be sorted based on the requirement. It can sort the data based on the data source such as ascending, descending order, or depend on any measured value.
The procedure for sorting the data is given below, step by step:
For example, consider a data source such as sample-superstore, and you want to sort the dimensions and the measures fields as follows.
Step1: Add the sample-superstore data source with Tableau and drag the Order table to the pane shown in the below screenshot.
Step2: Go to the worksheet and drag the dimension Category to the row shelf and the measure Sales to the column shelf.
It creates a horizontal bar chart. Category field present in the visual order, and it is sorted based on data source by default. We can change the order of sorting by following the below procedure.
Step3: Right-click on the Category field and select Sort option.
After that, it opens the Sort window. All options present inside the sort window is shown below as follows:
The field can be sorted in different types of methods that are explained below as follows.
For example, suppose the Category field is sorted based on another field such as 'Sales'.
Step1: Click on 'Field' radio button.
Step2: Select the field on which the Category is to be filtered.
Step3: Select the aggregation type.
Step4: Click on Clear button.
In the above example, it filters the Category field based on the sum of sales in ascending order. And it sorts the data which is shown in below screenshot.