- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
show rank in cards (without any row)
Hi I want to show rank in cards.
Like
Category SALES
A 22
B 29
C 50
D 60
So when I select category C, then in the card I should see '2' as the rank on sales is the second.
I treid this DAX that works in table/matrix but not on Cards.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @logan_logan ,
Please try to create a measure with below dax formula:
Measure2 =
VAR _rk =
RANKX ( ALL ( 'Table' ), CALCULATE ( MAX ( 'Table'[SALES] ) ),, DESC, DENSE )
VAR _result =
IF ( ISFILTERED ( 'Table'[Category] ), _rk, BLANK () )
RETURN
_result
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @logan_logan ,
Please try to create a measure with below dax formula:
Measure2 =
VAR _rk =
RANKX ( ALL ( 'Table' ), CALCULATE ( MAX ( 'Table'[SALES] ) ),, DESC, DENSE )
VAR _result =
IF ( ISFILTERED ( 'Table'[Category] ), _rk, BLANK () )
RETURN
_result
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had to tweak a lillte bit as I had two categories but **bleep** worked. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@logan_logan you can reshape with a CALCULATE function:
Rank_LM_Category2 =
RANKX(
FILTER('table', 'table'[Category] = "Category 2"),
CALCULATE(SUM('table'[Sales]), ALL('table'[Category])),
,
DESC
)
Let me know if this works
Thanks
Dallas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Actually I will filter another category(lets say caterogy 2) and then I need the rank on category (A,B,C,D).
So can you please reshape your dax?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@logan_logan let try FILTER constent to your meassure for the table to include only the rows where the Category matches the selected category in your card.
Rank_LM =
RANKX(
FILTER('table', 'table'[Category] = SELECTEDVALUE('table'[Category])),
SUM('table'[Sales]),
,
DESC
)
Let me know if this works
Thanks
Dallas

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
08-01-2024 11:48 AM | |||
07-12-2024 05:33 AM | |||
09-03-2024 10:13 AM | |||
08-20-2024 09:47 AM | |||
09-11-2024 03:05 PM |
User | Count |
---|---|
24 | |
12 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
13 | |
12 | |
10 |