cancel
Showing results for
Did you mean:

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

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

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.

8 REPLIES 8
Community Champion

@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.
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”.

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.

New Member

Hi,

I'm having the same problem,

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

Anonymous
Not applicable

But why does this work..

Anonymous
Not applicable

Using the whole table worked!

Super User

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

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

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Super User

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

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

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

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors