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
mraka9
Helper III
Helper III

Ranking by Multiple Columns

Case NumberGroupItemPriceManufacturerRANK
100-001110,00xx1
100-001110,50yy2
100-001111,00xy3
100-002120,00xy2
100-002118,00xx1
100-002125,00yy3
101-00311,00xx1
101-00311,50yy2
101-00327,00yy2
101-00325,00xy1
101-00339,00xx2
101-00338,00yy1

 

Hello everyone!

I need help!
I want to get a Rank column!

Price is a ranking criterion, but ranking based on item number, group, and item is required.

Thus, an identical number of items, group, and item are the ranking criteria.

Thank you in advance!

Greeting!

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@mraka9

Add the following formula as a new column to the table:

Rank = 
RANKX(
    FILTER(Table5,Table5[Group] = EARLIER(Table5[Group]) && Table5[Item] = EARLIER(Table5[Item])),
    Table5[Price],,ASC
)

Fowmy_0-1609006110021.png

________________________

If my answer was helpful, click OK as the solution to help other members find it useful

Click the Thumbs-Up icon if you like this answer 🙂


Website Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
mraka9
Helper III
Helper III

Thanks Fowmy!

Great!

I also added the Case number to the formula.

Greeting

Fowmy
Super User
Super User

@mraka9

Add the following formula as a new column to the table:

Rank = 
RANKX(
    FILTER(Table5,Table5[Group] = EARLIER(Table5[Group]) && Table5[Item] = EARLIER(Table5[Item])),
    Table5[Price],,ASC
)

Fowmy_0-1609006110021.png

________________________

If my answer was helpful, click OK as the solution to help other members find it useful

Click the Thumbs-Up icon if you like this answer 🙂


Website Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

lbendlin
Super User
Super User

What have you tried so far?  Here's a good article on the topic. RANKX on multiple columns with DAX and Power BI - SQLBI

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.