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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Young_G_Han
Helper III
Helper III

Countries Item sales ranking

  Dear Sir

 

I need a measure that can show a ranking of each product.

 

But it is not a normal ranking.

 

 

For example,

 

Country     Product     Q'ty

Korea         A               10

Korea         B                 5

Japan         A                 5

Japan         B                 3

China         A                 3

China         B                10

 

I would like to show a table that is showing the ranking of each product like below...

 

Country       Product      Ranking

Korea           A                1

Korea           B                2

Japan           A                2                

Japan           B                3

China           A                3

China           B                1

 

How can I make the ranking measure? Is it possible?

 

Please help.

 

1 ACCEPTED SOLUTION
mlsx4
Super User
Super User

Hi @Young_G_Han 

 

Rank = 
RANKX(
ALL(MyTable),
CALCULATE(SUM(MyTable[Qty])),,DESC, Dense)

mlsx4_0-1692257234546.png

 

View solution in original post

3 REPLIES 3
mlsx4
Super User
Super User

Hi @Young_G_Han 

 

Rank = 
RANKX(
ALL(MyTable),
CALCULATE(SUM(MyTable[Qty])),,DESC, Dense)

mlsx4_0-1692257234546.png

 

Dear mlsx4

 

Thank you. Due to the size of the table is huge, I could not use the same measure, but your All(MyTable) idea helped me to make a new measure and it is working.

 

Thank you so much.

I'm glad you could finally solve it!! 😉

 

You're welcome

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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