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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
wkeicher
Helper III
Helper III

Conditional Formatting based on Matrix Columns

Hi I am trying to format columns where the value of column 2 is greater than the value in Coumn 1 in a Matrix Visual.CondFormat.png

1 ACCEPTED SOLUTION
JIGAR
Resolver IV
Resolver IV

@wkeicher 

 

You can create a measure something like this

 

ColorFormat = SWITCH(
TRUE()
,SUM(Test2[Column2]) > SUM(Test2[Column1]), "#f44242","#F2C80F")
 
Column2 = ActualInternalCost, Column 1 = AllocatedInternalCost in your case.
 
After creating this measure, create a matrix using your columns. On ActualInternalCost set the conditional formatting for font colors/background color. 
 
On conditional formatting pop up, select Field Value in the Format By dropdown. 
Select the measure you created earlier in the Based on Field dropdown. You should be able to see the conditional formatting. Please see the screenshot below
 
Capture.PNG
 
Hope this helps !! Please mark the answer as accepted solution if you find it appropriate..
 
Thanks

View solution in original post

3 REPLIES 3
JIGAR
Resolver IV
Resolver IV

@wkeicher 

 

You can create a measure something like this

 

ColorFormat = SWITCH(
TRUE()
,SUM(Test2[Column2]) > SUM(Test2[Column1]), "#f44242","#F2C80F")
 
Column2 = ActualInternalCost, Column 1 = AllocatedInternalCost in your case.
 
After creating this measure, create a matrix using your columns. On ActualInternalCost set the conditional formatting for font colors/background color. 
 
On conditional formatting pop up, select Field Value in the Format By dropdown. 
Select the measure you created earlier in the Based on Field dropdown. You should be able to see the conditional formatting. Please see the screenshot below
 
Capture.PNG
 
Hope this helps !! Please mark the answer as accepted solution if you find it appropriate..
 
Thanks

Small Issue - When I apply the formatting to the following - I do not get the desired result. It works for all other feilds. I suspect it has to do with not being able to Sum(Total_Actual_Cost) because it is already a Measure. Is there a work around?meas.png

@wkeicher 

 

I believe if you use columns on both the sides of (>) sign or measures on both the sides of (>) sign you should see the desired result. Please see the screenshot.

Capture.PNG

I can see you are using column on end side and measure on the other. 

 

Hope that helps !!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.