This example uses a multidimensional data source to sort the rows of a bar chart in order to determine which beverages have the highest sales. To create the view, follow the steps below.
Place the Sales measure on the Columns shelf
and the Gen2,Product dimension on the Rows shelf.
Drill down one level in the hierarchy to display Gen3,Product.
Sort Gen3,Product in descending order
by the Sales measure.
Right-click on Gen3,Product and select Sort from the field’s context menu. In the Sort dialog box, select Descending as the Sort order and sort by the Sales field.
The view is shown below. Notice that the Gen3,Product members are sorted within each parent member. For example, Cola, Diet Cola, and Caffeine Free Cola are sorted only within the Colas level. Tableau does not rearrange headers that appear before the sorted field.
If you want to order dimension members without regard to
its parent, you should remove Gen2,Product from the Rows shelf.
The sorted data are shown below.