Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
I have 2 fields, Name and Total. I want to create 2 cards, one to show the name of the person who scored the highest and the second card to show the highest number. for the highest number, it works fine but for the name, it did not. Please see the screenshot below also the source file link is below. Any help would be very much appreciated. Thanks
https://drive.google.com/file/d/1ziZgvMe8JDU4PB7PNWVozvZsluuJiCUR/view?usp=sharing
Solved! Go to Solution.
Hi @lastnn30 - you cannot filter cards the same way you can tables and other visuals since they only return one value.
Try this measure:
Top Name =
VAR varTopValue = MAX('Latest File'[Total])
VAR Result =
MAXX(
FILTER(
'Latest File',
'Latest File'[Total] = varTopValue
),
'Latest File'[Name]
)
RETURN
Result
It gets the top value in that table, then gets the name of that person. MAXX() here is just converting the name to a scalar value, not returning the hightest name. the FILTER() function is returning a single record with Mark's data.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thank you so much for your help. I appreciate it.
Hi @lastnn30 - you cannot filter cards the same way you can tables and other visuals since they only return one value.
Try this measure:
Top Name =
VAR varTopValue = MAX('Latest File'[Total])
VAR Result =
MAXX(
FILTER(
'Latest File',
'Latest File'[Total] = varTopValue
),
'Latest File'[Name]
)
RETURN
Result
It gets the top value in that table, then gets the name of that person. MAXX() here is just converting the name to a scalar value, not returning the hightest name. the FILTER() function is returning a single record with Mark's data.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you so much for your help. I appreciate it.
Glad to assist @lastnn30
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |