Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have created a matrics in which i have 9 measures and each one has different color coding , i have also calculated their color coding by creating a measure, Now i want to calculate maximum occuring color in that matrics .
colors are Red ,Amber, Green.
Solved! Go to Solution.
Hi @Gurpreetsingh55 ,
I created some data:
If you conditionally set the color by a combination of measure and Field value, you can use the following.
Here are the steps you can follow:
1. Enter data – create a table.
2. Create measure.
Count_color =
var _measure1=
COUNTX(
FILTER(ALL('Table'),
[Jan-color]=MAX('color_Table'[Color])),[Index])
var _measure2=
COUNTX(
FILTER(ALL('Table'),
[Feb-color]=MAX('color_Table'[Color])),[Index])
return
_measure1+_measure2
Max_Color =
var _max=
MAXX(
ALL('color_Table'),[Count_color])
return
MAXX(
FILTER(ALL('color_Table'),[Count_color]=_max),[Color])
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Gurpreetsingh55 ,
I created some data:
If you conditionally set the color by a combination of measure and Field value, you can use the following.
Here are the steps you can follow:
1. Enter data – create a table.
2. Create measure.
Count_color =
var _measure1=
COUNTX(
FILTER(ALL('Table'),
[Jan-color]=MAX('color_Table'[Color])),[Index])
var _measure2=
COUNTX(
FILTER(ALL('Table'),
[Feb-color]=MAX('color_Table'[Color])),[Index])
return
_measure1+_measure2
Max_Color =
var _max=
MAXX(
ALL('color_Table'),[Count_color])
return
MAXX(
FILTER(ALL('color_Table'),[Count_color]=_max),[Color])
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Gurpreetsingh55
Please create a pbix that contains sample data but still reflects your semantic model (tables, relationships, calculated columns, and measures). Upload the pbix to OneDrive, Google Drive, or dropbox and share the link in this thread. If you are using a spreadsheet to create/import the sample data instead of the manual import method, share the spreadsheet as well.
Proud to be a Super User! | |
Hi @PijushRoy , Sorry i cannot share the PBIX and data i just want to know the logic if it can be done by any means.
Thanks
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
103 | |
98 | |
98 | |
38 | |
37 |
User | Count |
---|---|
154 | |
120 | |
73 | |
73 | |
63 |