Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all
I have a matrix visual with customer segments in rows (retail-chains, wholesalers, mini-markets, cafetarias), product category in columns (fast moving, slow moving, stalled stock) and I have a field and a measure under each product category in columns (1- field is sales_value and 2- A measure which is sum(sales_value).
The second column under each product category is converted into % of row totals to show % of each product category for each customer segment row.
I have a need to apply different background color formatting to the second column which is % of total for each row.
If I simply apply conditional formatting for background color, it will apply the same formatting to all % columns for all product categories.
But I have a need to apply different conditional formatting for each product category separately.
Appreciate help to know how above can be achieved. Below is more detail for understanding.
Thanks in anticipation.
| fast moving | slow moving | stalled stock | total | |||||
| CustSeg | sales | % | sales | % | sales | % | sales | % |
| retail-chains | 100% | |||||||
| wholesalers | 100% | |||||||
| mini-markets | 100% | |||||||
| cafetarias | 100% | |||||||
| total | 100% | |||||||
| fast moving | < 60% Green, 60-70% Yellow, 70-80% Green, Above 80% Blue | |||||||
| slow moving | < 20% Green, 20-30% Yellow, 30-40% Green, Above 40% Blue | |||||||
| stalled stock | < 5% Green, 5-10% Yellow, 10-15% Green, Above 15% Blue | |||||||
| total | same color for all rows |
Hi PijushRoy
First of all thanks for taking time to look at my question and answer.
The measure I have for % column is same for all product categories, which I converted to % of row total.
As I mentioned in my question, if I simply apply conditional formatting for background color, it will apply the same formatting to all % columns for all product categories.
I already tried your suggestion, but it will apply same formatting to all % columns for all production categories i.e. fast moving, slow moving, stalled stock, total.
But I have a need to apply different conditional formatting for % column under each product category separately.
Appreciate if you can guide how can i apply separate conditional formatting for each % column under each product category.
I have tried to explain what is required in a gried I copied in my initial question.
Hi @mspbilearner
Please create a measure like
FastMovingColor =
SWITCH(
TRUE(),
SUM(Table[Column])>=80%,"Blue",
SUM(Table[Column])>=70%,"Green",
SUM(Table[Column])>=60%,"Yellow",
"GREEN")
Use the measure in below
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
Proud to be a Super User! | |
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.