Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
benech
New Member

how to get top/flop 5 with multiple columns

Hi all

 

I have a table and I need to get TOP/FLOP 5 for a measure called 'perf' but for all columns not by group and I didn't find any answer yet. Hope someone can help!

I have three columns that need to be used, year, amount and score 

 

year      amount   score    perf  

2024       2K          12       8%

2023       1K          8         5%

2023       7K          5        -2%

2022       10K        3        -6%

2022       6K          1         2%

2024       15K         7         -1%

2024       5K          3         -7%

 

the expected result would be for the top5

 

year      amount   score    perf    rank 

2024       2K          12       8%      1

2023       1K          8         5%      2

2022       6K          1         2%      3

2024       15K         7        -1%     4

2023       7K          5        -2%      5 

 

Thanks a lot !! 🙂

1 ACCEPTED SOLUTION
qqqqqwwwweeerrr
Super User
Super User

Hi @benech 

 

you can create rank columns by using this measure:

Rank = RANKX(ALL('YourTableName'), [ColumnToRank], , DESC, Dense)

 

and use that in filter 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

 

View solution in original post

1 REPLY 1
qqqqqwwwweeerrr
Super User
Super User

Hi @benech 

 

you can create rank columns by using this measure:

Rank = RANKX(ALL('YourTableName'), [ColumnToRank], , DESC, Dense)

 

and use that in filter 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.