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
Anonymous
Not applicable

Ranking by two Measure Value

Hi All,

 

I have following Dataset. By using Sales & Unit measure i want to create Rank the customer  

 

DateCompanyProductSalesUnit
12/1/2019C1P1102
12/2/2019C1P2104
12/3/2019C1P1106
12/4/2019C2P2102
12/1/2019C2P1102
12/2/2019C2P2102
12/3/2019C3P153
12/4/2019C3P253
12/1/2019C4P153
12/2/2019C4P253
12/3/2019C5P172
12/4/2019C5P285

 

primarily i want to rank by sales. If two customer has same sales value we need to consider Unit Value

 

Screenshot_9.png

 

If Sales and Unit is same i want to rank Randomly (Same Value has different Rank )

 

Screenshot_1.png

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have been able to get the following:

Revenue = SUM(Data[Sales])
Units = SUM(Data[Unit])
Revenue and units = [Revenue]+([Units]/1000)
Rank = RANKX(ALL(Data[Company]),[Revenue and units])

However this returns the same rank where sales and units are the same.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

I have been able to get the following:

Revenue = SUM(Data[Sales])
Units = SUM(Data[Unit])
Revenue and units = [Revenue]+([Units]/1000)
Rank = RANKX(ALL(Data[Company]),[Revenue and units])

However this returns the same rank where sales and units are the same.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Anonymous ,

 

look at this.

https://community.powerbi.com/t5/Desktop/How-to-Rank-a-list-based-on-2-values-double-rankX/td-p/44008

 

PBIX

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.