Forum Discussion
Sorting table with multiple columns
- 7 years ago
Anonymous solution attached, look at table1 in attached, it has few columns and measures. you can play with it as per your need, didn't had much time to work on it thou but I guess you will get idea from it.
Anonymous is this expected output?
- Anonymous7 years agoNot applicable
Exactly!!! Am I missing something? I tried multiple ways but I am in one step behind the solution. Can you please explain?
- parry2k7 years agoSuper User
Anonymous solution attached, look at table1 in attached, it has few columns and measures. you can play with it as per your need, didn't had much time to work on it thou but I guess you will get idea from it.
- Anonymous7 years agoNot applicable
Hi parry2k
The below doesn't work and the Y/N column is empty for my case:
#_TOP = var x = TOPN([TOTAL_ROWS], VALUES('Table'[A), [B], DESC) RETURN IF('Table'[A] IN x, "Y")Table is the table name, A, B are the columns. B is the column need to be sorted. Total_Rows is the rows to be taken in Top N.
Once I get the results, I need to rank the result set by Column C and get only Top 5 Rank. Can you please help on this issue? Thanks!