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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-eqin-msft
Community Support
Community Support

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.