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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
adelmonte
Resolver I
Resolver I

Matrix Row Conditional Color Formatting - Field Value

Hi all,

I am trying to apply conditional formatting to a measure inside of a Matrix "ROW" but my color measure doesn't work.
Any tip on why it doesn't work?

adelmonte_2-1677164352627.png

 

Conditional Formatting Measure:

Status_Color IF =
IF (
[My % Measure] > 1.15 || [My % Measure] < 0.85, //Greater than 115% or Less than 85%
"RED",
IF (
[My % Measure] >= 0.90 || [My % Measure] <= 1.1, //Greater or equal to 90% or Less or equal to 110%
"GREEN",
IF (
[My % Measure] >= 0.85 && [My % Measure] < 0.90 || //Greater or equal to 85% or Less than 90%
[My % Measure] > 1.1 && [My % Measure] <= 1.5, //Greater than 110% or Less or equal to 115%
"YELLOW"
)))

88% should be Yellow

adelmonte_0-1677164225684.png

112% should be Yellow

adelmonte_1-1677164301241.png
Thanks,
Alex

 

6 REPLIES 6
Padycosmos
Solution Sage
Solution Sage

Please try the following:

SWITCH(TRUE(),[My % Measure] < 0.85 || [My % Measure]> 1.15 ,"RED",
[My % Measure] >= 0.90 || [My % Measure] <= 1.1,"GREEN",
([My % Measure] >= 0.85 && [My % Measure] < 0.90) || ([My % Measure] > 1.1 && [My % Measure] <= 1.5), 
"YELLOW"
)

 

Hi @Padycosmos
thank you very much for your reply but nothing changed it shows the same as with IF 😞

I have moved up the yellow. Could you please see if it makes a difference?

SWITCH(TRUE(),[My % Measure] < 0.85 || [My % Measure]> 1.15 ,"RED",

([My % Measure] >= 0.85 && [My % Measure] < 0.90) || ([My % Measure] > 1.1 && [My % Measure] <= 1.5), "YELLOW",
[My % Measure] >= 0.90 || [My % Measure] <= 1.1,"GREEN")

@Padycosmos  unfortunately it doesn't work

If the data is not sensitive , could you please share the pbix file? 

@Padycosmos   data is sensitive I can't share it thanks anyway

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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