Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.