Select ctrl+a and then try sorting.
I tried it already..but doesn't work. the sort icon shows inactive.. see my previous attached
1 of 1 people found this helpful
Right click the Designation dimension
Click on the Field in Sort by and select the Productivity measure value.
And select the Sort Order.
3 of 3 people found this helpful
Tableau never sorts Measures directly; it sorts Dimensions optionally based on the values of some Measure.
So in your case, I think you actually want to sort the Dimension called Code , descending by MAX(Productivity). Apply your Sort to the Code pill, and see if you can get what you wanted.
The only possible complication is that you're doing a lot of Data Blending, so that may or may not affect how this goes.
i agree with Ken here -- but blending can introduce complications. Post a sample TWBX with a couple of blended sample data sources (can use Superstore Sales and/or Coffee Chain datasets that ship with Tableau to create a mocked up example). This will allow others to interact with a similar view, and provide the best help possible for your scenario.
But Ken is right -- the main concept to understand here is that we sort Dimensions in Tableau by Measures -- we don't sort the Measures directly.
This sorting of Dimensions by measure value workd in Tableau Desktop, but after the report is posted to Server, doesn't work. Any idea how to mae this sorting by measure values work in the Web published report?
Please refer to this link. I believe it cover your concern.
Published: 18 Jun 2013
Last Modified Date: 17 Jan 2018
When using data blending, the computed sort options are not available (grayed out) from the toolbar.
To resolve this issue try one of the following options:
Option 1: Apply a computed sort manually
- In the Data window, right-click the relevant field.
- Select Default Properties > Sort.
- Change the default sort order of the field using the various options, and then click OK.
Option 2: Create a calculation for a more dynamic sort
- In the secondary data source, select Data > Create Calculated Field.
- In the Formula text box, create a calculated field that aggregates the measure you would like to sort on. For example, type
- Right-click the calculation you just created in step 2, and select Convert to Discrete.
- Drag the calculation to the left-most position in the Rows or Columns shelf.
- Right click the calculation in the Rows or Columns shelf, and select Show Header to remove the selection
Note: By default, values will be sorted in ascending order. If you want to sort in descending order, add a minus symbol in front of the aggregated measure in the calculation. Open the attached packaged workbook to see this example.
When using data blending, the automatic sort options are not available (grayed out) for secondary dimensions.
- If the dimension is converted to an attribute, it is possible to use the computed sort options from the toolbar. To convert a dimension to an attribute, right-click the relevant dimension field in the Columns or Rows shelf, and select Attribute. For more information about attributes, refer to the "Aggregating Dimensions" section in the Aggregating Data topic in the Desktop Help.
- Community Forum: Sorting Blended Data
End of Quote