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 on a value (calculated measure) which has values in percentage

hi all,

@v-shex-msft 

my .pbix file link is below. please help to achieve the correct Ranking.

want to calculate RANK for calculated measure "% Change Dollar Price" ( view this measure in pbix )

i tried with below formula but its showing wrong result: 

 

RANKC = 
RANKX(
    'Big Mac Index',
    'Big Mac Index'[% Change Dollar Price]
)

 

my wrong results:

Core2Plus_1-1624617993880.png

correct results:

Core2Plus_0-1624617901971.png

 

Link to my pbix file 

regards

 

 

 

1 ACCEPTED SOLUTION

RANKC =
RANKX (
FILTER ( ALL ( BMICountries[Country] ), [% Change Dollar Price] <> BLANK () ),
[% Change Dollar Price]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

RANKC =
RANKX(
ALLSELECTED(BMICountries[Country]),
[% Change Dollar Price]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

@Jihwan_Kim  thanks for quick response

but its not working as it should be. it is showing ranking 1 to 5 for selected countries.

please check my 2nd screenshot where it shows what result is expected. calculating Rank for all countries, and some countries has null values in " % Change Dollar Price " 

hope it clear.

regards

RANKC =
RANKX (
FILTER ( ALL ( BMICountries[Country] ), [% Change Dollar Price] <> BLANK () ),
[% Change Dollar Price]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

perfect man @Jihwan_Kim 

its working fine, thank you for great help.

regards

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.