Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hello Dear community,
Can anyone help me to with DAX measure which will return Max value from difference % column & it's category name.
And which visualization can I use which will show both?
In following example I want visualization to show : [Personal Service 166] or [Personal Service 437%]
Thank you.
Solved! Go to Solution.
Hi @Akbarov ,
You can use a Card Visual to show your requirement.
I tested the steps below out in the Contoso Sample Power BI dataset on my machine. They got me this result:
1. Create a measure which would go something like this:
Measure For Card Visual =
VAR ABC = SUM(TableName[%DifferenceFromAmountField])
VAR BCD = MAXX(SUMMARIZE(TableName, CategoryName), ABC)
RETURN
BCD
2. Add a card visual. Add the above created measure into the card visual.
3. Go into the format settings of the Card Visual -> NAvigate to "General" -> Switch On Title settings -> Click the Fx button next to title heading (refer screenshot below):
4. Now choose the Category field as in the Fx conditional formatting field.
5. Click Ok.
Your card will show you the MAX Value of your field and the title will show the category that the MAX value belongs to.
Hope this helps. Please give a thumbs up if it does 🙂
Also, to understand the idea behind the calculation you can refer to this video -
https://youtu.be/UJPBeiGBEg4
Hi,
Trythese measures
Max difference % = MAXX(all(data[category]),[difference %])
Category of max difference % = FIRSTNONBLANK(TOPN(1,VALUES(Products[Category]),[difference %]),1)
Drag both measures to a multi card visual. If these measures do not work, then share the link from where i can download your PBI file.
Thanks both for answers, my values ( % ) mostly negative values, I used ABS() now results are correct.
Hi,
Trythese measures
Max difference % = MAXX(all(data[category]),[difference %])
Category of max difference % = FIRSTNONBLANK(TOPN(1,VALUES(Products[Category]),[difference %]),1)
Drag both measures to a multi card visual. If these measures do not work, then share the link from where i can download your PBI file.
Hi @Akbarov ,
You can use a Card Visual to show your requirement.
I tested the steps below out in the Contoso Sample Power BI dataset on my machine. They got me this result:
1. Create a measure which would go something like this:
Measure For Card Visual =
VAR ABC = SUM(TableName[%DifferenceFromAmountField])
VAR BCD = MAXX(SUMMARIZE(TableName, CategoryName), ABC)
RETURN
BCD
2. Add a card visual. Add the above created measure into the card visual.
3. Go into the format settings of the Card Visual -> NAvigate to "General" -> Switch On Title settings -> Click the Fx button next to title heading (refer screenshot below):
4. Now choose the Category field as in the Fx conditional formatting field.
5. Click Ok.
Your card will show you the MAX Value of your field and the title will show the category that the MAX value belongs to.
Hope this helps. Please give a thumbs up if it does 🙂
Also, to understand the idea behind the calculation you can refer to this video -
https://youtu.be/UJPBeiGBEg4
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
74 | |
69 | |
48 | |
40 |
User | Count |
---|---|
61 | |
41 | |
33 | |
30 | |
29 |