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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
lanndestefano
Frequent Visitor

Use of Rankx with a previously defined measure - possible?

Hi all, can I use rankx with a previously defined measure? E.g., essentially creating a measure of a measure?

 

My original measure references a table ("S") and calculates a volume variance by brand versus a previous month ("Measure X"). Now I'd like to rank those variances. Having difficulty - all values are returning as the highest or lowest ranked number (e.g., Brand A=1, Brand B=1, Brand C=1, Brand D=100, Brand E=100, etc.).

 

What I'm using follows.  Help?

 

Measure = rankx(all(Table S),Table S[Measure X],,asc)

1 ACCEPTED SOLUTION

Thanks @Vvelarde and @Sean. @Sean - that's not quite what I was looking for - but I did figure it out.

 

Ranking a previously defined measure:

 

NOT this: = rankx(ALL(table S),table S[measure X],,asc)

 

SOLUTION: = rankx(ALL(table S),[measure X],,asc)

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@lanndestefano please, Post sample data to try to give you a solution




Lima - Peru

Thanks @Vvelarde and @Sean. @Sean - that's not quite what I was looking for - but I did figure it out.

 

Ranking a previously defined measure:

 

NOT this: = rankx(ALL(table S),table S[measure X],,asc)

 

SOLUTION: = rankx(ALL(table S),[measure X],,asc)

Sean
Community Champion
Community Champion

Helpful resources

Announcements
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.