Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
96 | |
85 | |
77 | |
66 | |
63 |
User | Count |
---|---|
110 | |
96 | |
96 | |
67 | |
59 |