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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

RankX gives all 1

Hi My rankX gives all 1. 

This is the code 

Ranking = RANKX(
ALL(Enhet[Enhet])
, [Medelkontinuitet])

I've acctually done a lot of rankings before with this exact concept that is:

Ranking = Rankx(
All("some category reference in a column"), 
 [measure])

I have relationship between the enhet table ande kontinuitet table which is were the measure is calculated from..... 

Any ideas why it is behaving this way? 
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

By my test, there may be two reasons for your problem.

1.You can modify your formula to “Ranking=RANKX(ALL(Enhet),[Medelkontinuitet])”.

2.If it still not work, you can verify if the measure “[Medelkontinuitet]” has the same value in the table “Enhet”.

Or you are still confused about it, please provide me with more details about your problem.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
AntrikshSharma
Super User
Super User

@Anonymous Are you using the same column inside RANKX and the Visual/Matrix?

Anonymous
Not applicable

Hi @Anonymous ,

Rank = RANKX( ALLSELECTED( 'Enhet' ) ,[Measure] )
Hope so this will resolve your query.
Please accept it as a solution if you achieve the required target.
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

By my test, there may be two reasons for your problem.

1.You can modify your formula to “Ranking=RANKX(ALL(Enhet),[Medelkontinuitet])”.

2.If it still not work, you can verify if the measure “[Medelkontinuitet]” has the same value in the table “Enhet”.

Or you are still confused about it, please provide me with more details about your problem.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

I'm having the same problem,

I created a measure from the same table.. BAD measure is also from CSAT Table.

Rank = Rankx(ALL ('CSAT'),[Bad])

 

 

Anonymous
Not applicable

But why does this work.. 

Anonymous
Not applicable

Using the whole table worked! 

Greg_Deckler
Super User
Super User

@Anonymous See if this helps. You probably need a CALCULATE or something:

To *Bleep* with RANKX! - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

If you're calling a measure, then there's an implicit CALCULATE already.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors