Nested Sorting by Two Measures

Published: 27 May 2014
Last Modified Date: 04 Jan 2019


Unable to perform a nested sort on multiple measures.


Tableau Desktop


The following instructions can be reviewed in the attached workbook.
  1. Build a view with the desired dimension and the measures to be nested.
  2. Using table calculations, display the rank for each measure this way (RANK(SUM([Measure])))
  3. Create a new calculated field to to concatenate each rank, and then sort by that newly created concatenated field.
  4. Enter a formula similar to the following:(STR(RANK(SUM([Measure])))+ "-" +STR(RANK(SUM([Secondary Measure]))))
  5. Drag the newly created "rank" measure out to the leftmost space in the rows shelf.
  6. Right-click the Rank calculation and clear the Show Header selection.
Did this article resolve the issue?