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.
When creating a Matrix visual , I would like to know the percentage of recharge per resource. In my Data these values are hours (whole numbers). In the Matrix I turn these hours into percent of row total to have percentage values per resource. After doing that I can't conditional format on these percentages. (see screenshot). I would like to have red color when Yes value is below 86% and green if 86% or above. Someone here who has a bypass for that via some code?
Someone already have added this as idea to solve in next updates if voted enough
Solved! Go to Solution.
Hi @mdebekke
Why don't you try creating measures as I have mentioned below for Yes % and No %.
1. Create measures
Yes % = CALCULATE(SUM(Table[YesHours])/(SUM(Table[YesHours]) + SUM(Table[NoHours])))
No % = CALCULATE(SUM(Table[NoHours])/(SUM(Table[YesHours]) + SUM(Table[NoHours])))
2. Convert datatype of these measures to % using the modelling tab
3. Use the measures in the matrix as in the above screenshot
4. You can use conditional formatting property available for matrix and set the color for any column as per the range conditions
This should serve your purpose!
Do try this approach and accept as solution if it works..and let me know in case of any queries!
Thanks,
Suguna.
Hi @mdebekke
Why don't you try creating measures as I have mentioned below for Yes % and No %.
1. Create measures
Yes % = CALCULATE(SUM(Table[YesHours])/(SUM(Table[YesHours]) + SUM(Table[NoHours])))
No % = CALCULATE(SUM(Table[NoHours])/(SUM(Table[YesHours]) + SUM(Table[NoHours])))
2. Convert datatype of these measures to % using the modelling tab
3. Use the measures in the matrix as in the above screenshot
4. You can use conditional formatting property available for matrix and set the color for any column as per the range conditions
This should serve your purpose!
Do try this approach and accept as solution if it works..and let me know in case of any queries!
Thanks,
Suguna.
To solve this to get the measures into my file I created 2 custom columns via "edit queries" with below formula, because I had 1 hours column:
= if Text.Contains([RECHARGE], "YES") then [Hours] else 0)
= if Text.Contains([RECHARGE], "NO") then [Hours] else 0)
This solved combined with your solution my challenge 🙂
Thanks!!!
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 |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |