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

RANKX additional context

Hi Friends,

 

I have issue with RANKX 

 

1.png

When I have table only with Customer Name and RANKX formula everything works well.

 

2.png

 

But when i'm adding addinional context (Company Type, Domain ) RANKX does not work properly.

3.png

 

Could you please help?

 

Thanks in advance!

 

Regards,

Oleh

 

1 ACCEPTED SOLUTION

Hi  @Anonymous

 

I made some changes to your model.


1. Changed the relationship direction and type 

2. Rank Measure - it needs to be ALL( Account[Account] ) not ALL(  Revenue [Account] )

3. In your visuals use the fields from the Account table, not from Revenue 

 

Please see the attached file.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

View solution in original post

8 REPLIES 8
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

If you are trying to rank over the columns you are adding then you will need to include these columns in the first argument of rankx  ALL( column1, column2, column3 ).

 

If you are looking for a different outcome then please can you provide a data sample and an outcome expected.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Anonymous
Not applicable

@Mariusz,

 

You can find Data Sample and expected outcome via this  Link  

 

 

4.png

Thanks for your help!

Regards,

Oleh

Hi  @Anonymous

 

I made some changes to your model.


1. Changed the relationship direction and type 

2. Rank Measure - it needs to be ALL( Account[Account] ) not ALL(  Revenue [Account] )

3. In your visuals use the fields from the Account table, not from Revenue 

 

Please see the attached file.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Anonymous
Not applicable

Hi @Mariusz ,

 

Unfortynately rank equals "1" for all Accounts:(

 

Hi @Anonymous 

 

Sorry I missed that, please see the attached with a fix to the Rank Measure.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Anonymous
Not applicable

@Mariusz It works!

Thank you - you're a magician)

Have a nice day!

Regards,

Oleh

Anonymous
Not applicable

7.png

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.