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
AlexDias
Frequent Visitor

Ranking measure needs expert opinion

Hello everyone,

 

I'm getting some wierd values which I can't understand and they aren't what I was expecting to get.

 

sales01.png

Sales02.png

I have a calculated column based in this formula:

Sales (EUR) = Sales[Amount]/ Sales[RATE EUR-USD] 

 

And my measures are:

Total Revenue = SUM(Sales[Sales (EUR)])
Rank ASC = RANKX(ALL(Sales);[Total Revenue];;ASC)
Rank DESC = RANKX(ALL(Sales);[Total Revenue];;DESC)

I can't understand the the ranking values, I was expecting to get sequencial numbers from 1 to 7 and 7 to 1 as I only got 7 different clients at my table data.

 

I can't figure what I'm doing wrong.

 

1 ACCEPTED SOLUTION
AlexDias
Frequent Visitor

Problem solved, I was using the table to calc the rank and not the firld that iIactualy was expecting to be ranked.

 

Solved using:

 

Rank ASC = RANKX(ALLSELECTED(Sales[Client Name]);[Total Revenue];;ASC)
Rank DESC = RANKX(ALLSELECTED(Sales[Client Name]);[Total Revenue];;DESC)

But please, if anyone has a better idea please tell.

View solution in original post

1 REPLY 1
AlexDias
Frequent Visitor

Problem solved, I was using the table to calc the rank and not the firld that iIactualy was expecting to be ranked.

 

Solved using:

 

Rank ASC = RANKX(ALLSELECTED(Sales[Client Name]);[Total Revenue];;ASC)
Rank DESC = RANKX(ALLSELECTED(Sales[Client Name]);[Total Revenue];;DESC)

But please, if anyone has a better idea please tell.

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.

Top Solution Authors