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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
cln
New Member

Display a podium top3 values using card based on dynamic data

Hello

 

I'm working on a visual report to display the three best values on a podium with 3 cards, using slicer and visual table. 

Data are stored on the following table :

 

cln_0-1691336514190.png

 

I want to visualize the three best persons with the maximum distance for a selected week.

 

At the first time, I computed a table :

DistanceRankingTable = SUMMARIZE(CALCULATETABLE('Demo','Demo'[Week]="W30"),'Demo'[Name,'Demo'[Week],"Distance",SUM('Demo'[Distance (odometre)]))

All seemed to work well ... but that was not possible to interact with UI filter (slicer) to select a week and replace "W30" by a variable binded to an UI object. 

 

So, I tried a new method, to interact with visual table / results.


I added a slicer to select the week and filter the data of the "Demo" table.

cln_1-1691336806288.png

A new measure "DistanceRanking" was added to determine the 3 best persons, using the code :

 

DistanceRanking =
    RANKX(
        ALL('Demo'[Name]),
        CALCULATE(SUM('Demo'[Distance]))
        )

 

cln_2-1691336936580.png

 

The format is "whole number".

 

The rankings are correct for all weeks :

cln_5-1691339037610.png

cln_6-1691339087908.png

But, the issue is coming.

 

The "card" displays the Name as wanted but the filter "DistanceRanking" is not enabled to set the ranking value to "1" for the first (or "2" for the second, "3" for the third).

 

cln_4-1691338960169.png

 

When a new week is selected, all data are refreshed, rankings are well calculated, but the card displays all the time the first alphabetic item, because no filter for the ranking can be defined (dropdown is not enabled).

 

How can I set the ranking to 1 (2 and 3) to retrieve the 3 best players ?

 

Thanks for any help

 

2 REPLIES 2
parry2k
Super User
Super User

@cln measures can be only used as a visual level filter, not a page or report level filter.

 

👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k  So for you, that's not possible to link the ranking measure data to the card control ?

Is there a solution to achieve this goal ? Using DAX, code, ... ?

Thanks a lot

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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