Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi, I need some help creating a measure to use for conditional formatting in a matrix. I have the following matrix:
In addition to this, I have a slicer that filters for the following metrics: net sales, COGS, EBITDA, op inc, Gross margin, and SG&A.
I only need conditional formatting for the "Variance" row. It needs to be based on a couple of conditions.
When COGS or SG&A is selected in the slicer AND variance >= 0, I need the background colored "#FFC7CE"
When COGS or SG&A is selected in the slicer AND variance < 0, I need the background colored "#C6EFCE"
When anything else is selected (i.e. net sales, EBITDA, op inc, and gross margin) AND variance >= 0, background color "#C6EFCE"
When anything else is selected AND variance < 0, background color "#FFC7CE"
Any help is appreciated!
Solved! Go to Solution.
I had been having this problem for about two days. Couldn't quite get the solution right, but as soon as I post here, I figured it out. Here's the solution in the event someone coming across this has a similar issue.
I had been having this problem for about two days. Couldn't quite get the solution right, but as soon as I post here, I figured it out. Here's the solution in the event someone coming across this has a similar issue.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 135 | |
| 110 | |
| 50 | |
| 31 | |
| 29 |