Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
What I'm trying to do seems easy, but I can't find a way to get it working.
I have a table with multiple categories, where a category could exist multiple times, and the amount:
Category | Amount |
a | 5 |
b | 10 |
c | 2 |
a | 3 |
b | 20 |
c | 9 |
I would like to create a DAX measure that shows me the category name of the category with the highest SUM of the values for that category. In this case the measure should just display: "b"
* (10+20) is the higest sum *
** As a reference:
When I create a table with the summarized value. I would like the top 1 category name in a Card visual, here value "b".
Thanks in advance.
Jef
Solved! Go to Solution.
Hi @Anonymous
You can use an expression like below in your card visual.
rankCategory =
CONCATENATEX(
TOPN( 1, ALL( 'Table'[Category] ), CALCULATE( SUM( 'Table'[Amount] ), ALL( 'Table'[Amount] ) ) ),
'Table'[Category],
"; "
)
Please see the attached file for the ref
Hi @Anonymous
You can use an expression like below in your card visual.
rankCategory =
CONCATENATEX(
TOPN( 1, ALL( 'Table'[Category] ), CALCULATE( SUM( 'Table'[Amount] ), ALL( 'Table'[Amount] ) ) ),
'Table'[Category],
"; "
)
Please see the attached file for the ref
Thanks. It is working perfect.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
87 | |
86 | |
68 | |
64 | |
63 |
User | Count |
---|---|
208 | |
120 | |
113 | |
79 | |
72 |