Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am in need of calculating and displaying the Highest Count Group in a Card Visual.
Note: Sample PBIX is given below,
1. What I have done so far -
I created a DAX to calculate the Maximum of Reason for a given Slicer selection.
I used a formula for achieving the above result,
MyMeasure = CONCATENATE("Won Reason ", "(" & MAXX(VALUES('Table'[Reason]),CALCULATE(COUNT('Table'[Reason]))) & " / " & COUNTROWS('Table') & ")" )
2. What I need further?
Now, I wanted to count and display the highest count group by Won Reason. Please refer the below screenshot to get more idea, How can I achieve this? Please help on this.
In that 4 --> 3 are due to Quality and 1 is due to price. Likewise, how can I get the results.
Many Thanks,
Praveen
Solved! Go to Solution.
Hi @Anonymous
Try this measure in a card visual
Measure = CONCATENATEX ( TOPN ( 1, SUMMARIZE ( 'Table', [Reason], 'Table'[Detailed], "Won Reason", COUNT ( 'Table'[Reason] ) ), CALCULATE ( MAXX ( VALUES ( 'Table'[Reason] ), CALCULATE ( COUNT ( 'Table'[Reason] ) ) ), ALLEXCEPT ( 'Table', 'Table'[Reason] ) ), DESC ), [Won Reason] & " - " & [Detailed], UNICHAR ( 10 ), [Won Reason], DESC )
@Anonymous
It works with sample data 🙂 as a card visual
Hi @Anonymous
Try this measure in a card visual
Measure = CONCATENATEX ( TOPN ( 1, SUMMARIZE ( 'Table', [Reason], 'Table'[Detailed], "Won Reason", COUNT ( 'Table'[Reason] ) ), CALCULATE ( MAXX ( VALUES ( 'Table'[Reason] ), CALCULATE ( COUNT ( 'Table'[Reason] ) ) ), ALLEXCEPT ( 'Table', 'Table'[Reason] ) ), DESC ), [Won Reason] & " - " & [Detailed], UNICHAR ( 10 ), [Won Reason], DESC )
@Anonymous
It works with sample data 🙂 as a card visual
Awesome Thank you very much for your prompt solution.
Hearty Thanks again,
Praveen.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |