Forum Discussion
multi column sort
Hi Anonymous,
In your scenario, you can try the DAX suggested by OwenAuger. Also you can add a third column like this, and sort table based on this column. See: Sort a table by the results of two columns .
Column 3 = ([Column 1] * 100) + (1/[Column 2])
Besides, you can also vote on this idea item: Add a multiple columns sort featue.
Best Regards,
Qiuyun Yu
Hi OwenAuger, v-qiuyu-msft,
Thanks for your replies. If im not wrong, these work if both the columns have values.
In my case, I have one column wit Text (Fiscal Period) and then values. I tried to use below DAX, but got the following error -
"A single value for column 'Sort By Fiscal Year' in table 'SFDC' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
Any idea how to correct this?
Final Rank = RANKX (
ALL (SFDC),
RANKX ( ALL (SFDC), SFDC[Sort By Fiscal Year],, ASC )
+ DIVIDE (
RANKX ( ALL (SFDC), SFDC[Value USD],, DESC ),
( COUNTROWS ( ALL (SFDC)) + 1 )
)
)