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.

Helper II

## RankX

RankX measure in card visual is showing a different number to the rank displayed in a table visual,

Is there any solution for this?

1 ACCEPTED SOLUTION
Super User

@karma123

I have attached a file for you, please check. It works for me.

Did I answer your question? Mark my post as a solution! and hit thumbs up
6 REPLIES 6
Helper II

I tried the following but am getting blank appear in the visual.

Test Rank = RANK( DENSE, ALL(Category[Category Names]), ORDERBY( [Premium], DESC ))

Note the premium amount is a DAX measure that has been used.

In the card visual I am adding a filter to select only one category.

Example Data as below

1       Food          £100

2       Lifestyle     £80

3       Transport   £60

4       Education   £20

When I put transport in a card it gives the rank as 4 when it should be 3 as shown in the table.

Super User

@karma123

I have attached a file for you, please check. It works for me.

Did I answer your question? Mark my post as a solution! and hit thumbs up
Helper II
Thank you so much! This has now worked 🙂
Super User

@karma123

Yes that's correct, it all depends on the context on which the calculation happens. Please provide some data and the expected results.

Did I answer your question? Mark my post as a solution! and hit thumbs up
Helper II

I am using the RANKX(ALL(Category[Category Names]), [Premium]) formula in the table and card visual. When I filter for a specific category it gives a different result in the table and card visual.

Do I need to use a different measure for the card visual?

Super User

@karma123

You can use the same measure for both as follows. Change DESC  to ASC if needed.

``````Rank Category =

RANK(
DENSE,
ALL(Category[Category Names],
)
``````

Did I answer your question? Mark my post as a solution! and hit thumbs up

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
Users online (525)