Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 :
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.
A new measure "DistanceRanking" was added to determine the 3 best persons, using the code :
The format is "whole number".
The rankings are correct for all weeks :
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).
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
@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
User | Count |
---|---|
84 | |
79 | |
70 | |
47 | |
41 |
User | Count |
---|---|
108 | |
52 | |
50 | |
40 | |
40 |