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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm having trouble trying to set up conditional formatting in a matrix visual that should do this:
If the date is 1 day before today (I have set up an indicator for this but would prefer it not be in the visualization itself) AND the number is greater than 300, highlight in yellow. If the date is 2 or more days before today (have an indicator for this as well) AND the number is greater than 300, highlight in red.
My table looks like the below. For example, the 452 packages listed in the 7/22 column should be highlighted in red. The 866 packages listed under 7/25 should be highlighted in yellow. The 777 packages listed under 7/26 should not be highlighted at all (as this is today as of posting time).
Solved! Go to Solution.
Hi,
Try these measures
Measure for Yellow = and(today()-min(data[date])=1,[measure]>300)
Measure for red = and(today()-min(data[date])>=2,[measure]>300)
Hope this helps.
The issue with this solution is that it results in two measures. I've read up quite a bit and I don't see a way to apply conditional formatting of one type to one table based on multiple measures. I was able to take what you gave me and combine it into one measure, though. So thanks again.
FORMAT = if(and(today()-min(TABLE[Date])>=2,[Packages]>300),1,if(and(today()-min(TABLE[Date])=1,[Packages]>300),2,0))
Hi @bensiqc ,
Whether the advice given by @Ashish_Mathur has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
The issue with this solution is that it results in two measures. I've read up quite a bit and I don't see a way to apply conditional formatting of one type to one table based on multiple measures. I was able to take what you gave me and combine it into one measure, though. So thanks again.
FORMAT = if(and(today()-min(TABLE[Date])>=2,[Packages]>300),1,if(and(today()-min(TABLE[Date])=1,[Packages]>300),2,0))
You are welcome.
Hi,
Try these measures
Measure for Yellow = and(today()-min(data[date])=1,[measure]>300)
Measure for red = and(today()-min(data[date])>=2,[measure]>300)
Hope this helps.
Thank you - I can see how this lets me use a measure to get to a True / False value for each. How would I integrate this into my chart, though? I don't see an option to use either of these for conditional formatting purposes if they aren't added to the Matrix, but adding them to the matrix ruins the formatting.
You are welcome. Please read up on how to use measures in conditional formatting.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 133 | |
| 104 | |
| 61 | |
| 59 | |
| 55 |