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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

how to show top10 rows in matrix

fiter the rank1 column between 1 and 10 in order to show 10 rows, the rank is based on total_tb1 column, and may have same rank, so the data may have more than 10 rows, then follow the rank of Account name, in order to  show exactly 10 rows.

and mesure is rank1 = rankx(ALL('dataset'[Account]),'dataset'[Total_tb1],,,Skip)
Do you have  any ideas, Thank you.
1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can try these measures:

rank2 = RANKX(ALL('dataset'[Account]),CALCULATE(MAX('dataset'[Account])),,ASC,Dense)
rank3 = [rank1]+[rank2]*(0.001)
  • rank1 is your original measure,
  • rank2 ranks the table on Account names ascendingly,
  • rank3 gets the unique rank value for every Account. Because rank2 should be after rank1, multiplying 0.001 to rank2 will reduce its influence on the result. 

vjingzhang_1-1649143939537.png

 

You can also combine the three measures into one measure. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I sloved almost the same way, Thank you!

v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can try these measures:

rank2 = RANKX(ALL('dataset'[Account]),CALCULATE(MAX('dataset'[Account])),,ASC,Dense)
rank3 = [rank1]+[rank2]*(0.001)
  • rank1 is your original measure,
  • rank2 ranks the table on Account names ascendingly,
  • rank3 gets the unique rank value for every Account. Because rank2 should be after rank1, multiplying 0.001 to rank2 will reduce its influence on the result. 

vjingzhang_1-1649143939537.png

 

You can also combine the three measures into one measure. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

Anonymous
Not applicable
Anonymous
Not applicable

First question would be how would you choose between the competing rows. Perhaps you can look at the logic of computing Rank by adding Account name (or some other relevant column/measure ) also after Total_tb1 to get the unique ranks (Rank1).

Anonymous
Not applicable

I see, the order follow the sequence:rank1, then the Account name.

I may have some problem with how to rank the Account name after rank1

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.