Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
february
New Member

Matrix Conditional Formatting by Measure, Field Value

Good morning everyone, 
 
I am attempting to format each total in my matrix but instead of it applying the background to only those meeting the criteria, it applies the background to every date in the calendar. In short, I need to see if IV is less than NR, and if it does color the background red. Current measure/DAX below. 
 
My suspicion is the row context in the measure is not jiving with the way in which the matrix heirarchy is laid out (tiered locations.. state>city>zip). Thanks for your help!
 

 

CF =
VAR IV = SUM(IV[DayIV])/COUNTROWS('Calendar')
VAR NR = SUM(Budget[Revenue])/COUNTROWS('Calendar')
RETURN IF(IV<NR,"#DE6A73")

 

1 REPLY 1
Anonymous
Not applicable

Hi @february ,

 

What fields are applied in Matrix visual? Are there relationships between the three tables? 

Eyelyn9_0-1648429987239.png

 

Could you please provide me with more details about your table and your expected output to help us clarify your scenario?
Or share me with your pbix file after removing sensitive data.

How to Get Your Question Answered Quickly

How to provide sample data in the Power BI Forum

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.