1 Reply Latest reply on Oct 4, 2018 2:58 PM by Michel Caissie

    sorting based on two measure value

    vengadesh palani

      Hi All


      by using below expression i have sort value based on growth but I need to include the second measure (last 3 month avg unit) also


      so first I want to sort in ascending based on Growth% then in descending based on  last 3 month avg unit


      how can i achieve this


      Formula Used:

      Shorting 1 .png


        • 1. Re: sorting based on two measure value
          Michel Caissie



          Tableau sorts using the leftmost dimension. So you can put a discrete copy of  SUM(Growth %)  on the Rows shelf at the left, followed by  a discrete copy of  minus  the SUM(Last 3 Month Avg Units).  (minus to get the descendant order).  This will give you the sorting you are looking for.


          Next you can right-click those two blue pills and uncheck  'Show Header'  to hide the sorting values.


          note: I had to  Round the Growth %  ROUND( [Growth %] , 2) because  even if you display a % with 0 decimals,   behind the hood  the  two  96%  are actually two different numbers, as you can see on sheet 3. And they must be the same value if you want the corresponding Last 3 Month values  to be sorted.



          1 of 1 people found this helpful