Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
kaushi2020
Creator II
Creator II

How to SORT in Pivot based on Specific column

Dear all, I have a VAR % Column in my Pivot table. is there a way I can sort data for column VAR% (Hight to Low) - the Var% is the calculation between MTD and LMTD.

kaushi2020_0-1700573027264.png

Thanks in Advance

 

Labels (3)
2 Solutions

Accepted Solutions
Alexan02
Partner - Contributor III
Partner - Contributor III

Hello @kaushi2020,

In the graph configuration section, in the 'Sort' option you must put 'Var%' first.

Inside 'Var%'  you click 'Sort by expression' and add the calculation expression of that field and order it asc or desc.

Try this form.

Regards, Alexandra.

View solution in original post

Jebrezov
Contributor III
Contributor III

the prior post is correct. to give a bit more detail and an example image attached, you need to select the first dimension in the pivot table to expand its options, deselect auto sorting on the first dimension, select sort by expression, choose ascending or descending, and enter in your master measure/ field Var%. it should sort that column now based on the aggregated values for that dimension.

you may need to play around with this and actually do it on the second dimension instead (or in addition) depending on how you are viewing the data (always showing the exploded view or not) and if you want it sorted by the values aggregated in the lowest level or if the first/highest level will be good enough. 

View solution in original post

4 Replies
Alexan02
Partner - Contributor III
Partner - Contributor III

Hello @kaushi2020,

In the graph configuration section, in the 'Sort' option you must put 'Var%' first.

Inside 'Var%'  you click 'Sort by expression' and add the calculation expression of that field and order it asc or desc.

Try this form.

Regards, Alexandra.

kaushi2020
Creator II
Creator II
Author

Thanks for the reply @Alexan02 , I reckon this option is visible in case of straight table. 

as this is a Pivot table, this will not be available. PSB screenshot. 

kaushi2020_0-1700574328491.png

 

Jebrezov
Contributor III
Contributor III

the prior post is correct. to give a bit more detail and an example image attached, you need to select the first dimension in the pivot table to expand its options, deselect auto sorting on the first dimension, select sort by expression, choose ascending or descending, and enter in your master measure/ field Var%. it should sort that column now based on the aggregated values for that dimension.

you may need to play around with this and actually do it on the second dimension instead (or in addition) depending on how you are viewing the data (always showing the exploded view or not) and if you want it sorted by the values aggregated in the lowest level or if the first/highest level will be good enough. 

kaushi2020
Creator II
Creator II
Author

Thanks @Jebrezov @Alexan02  for your details explanation.