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
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.