3 Replies Latest reply on Feb 20, 2017 4:30 AM by Norbert Maijoor

# How to sort a table calculation of type "percent difference"

(I am on v9)
I read elsewhere that sorting measures that are generated by a table calculation is not built into the product... :-(

I need to sort a table that has only two columns of data, and sort each column by % difference of the second column to the first column.

The columns are just a list of items and the data is number occurrences in a given month; and I simply want to show the percent change between those two months and order by largest percentage first..

• ###### 1. Re: How to sort a table calculation of type "percent difference"

Hi Nik,

Not sure if my approach is applicable in your scenario but find it below as reference and stored in attached workbook version 9.3 located in original threat.

Step 1: define a calculated field for each month

a. Januari 2016: if [Date]=#1-1-2016# then [Value] END

b. Februari 2016: if [Date]=#1-2-2016# then [Value] END

Step 2: define delta

delta %: (sum([Februari 2016])-sum([Januari 2016]))/sum([Januari 2016])

Step 3: sort

• ###### 2. Re: How to sort a table calculation of type "percent difference"

HI Norbert,

many many thanks for you reply. Yes, I think in my simple case this will do exactly what is needed...
as a newbie, I am still needing to remember that I can do conditional calculations - you answer is very straightforward..

thanks

nik

• ###### 3. Re: How to sort a table calculation of type "percent difference"

Hi Nik,

Your are welcome. Thanks for the "Badge".

Keep reaching out to the forum when needed on your journey. There are lots of "peaps" willing to help out.

Have a nice one.