One quick way to do it is to:
- create a duplicate of your calculation
- convert it to discrete
- put it in front of you other dimensions, e.g. first pill on row shelf
- Tableau will automatically sort the list based on that field
- Hide that field by right-clicking on it and un-ticking 'Show Header'
See attached workbook for an example. The first sheet is just a silly demo to prove that the list will be sorted dynamically, even if data changes. Just move the parameter slider to select what letter of the product name to sort on and see for yourself.
Sort by calculated field.twbx.zip 223.2 KB