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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Mous007
Helper IV
Helper IV

Conditional formatting issue

Hi all,

 

I have generated the below table with two metrics.

The Quality KPI switch = 

quality KPI switch = SWITCH(TRUE(),
[Quality KPI] < -0.1 , "G" ,
[Quality KPI] <= 0 && [Quality KPI] >= -0.1 , "A" ,
[Quality KPI] < 1 , "R" )
 
Mous007_0-1606309990682.png
 
I would like to apply  conditional formatting with three different colors to the quality KPI column using the quality KPI figures
I want to apply the following rules to my formatting
 
If Quality KPI is between 0 and - 10% --> "A" and "Color1"
If quality KPI is more than - 10% --> "G" and " Color2"
If quality KPI is more than 1% or any positiive value --> "R" and "color2".
 
I tried to add the colors into the switch function and also tried the conditional formatting but did not manage to get the expected results
 
Can anyone please help me achieve this or at least guide me on how i can get it done ?
 
Thanks in advance
 
 
 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Mous007 , a color measure like given below can used in conditional formatting with field value option

 

quality KPI color = SWITCH(TRUE(),
[Quality KPI] < -0.1 , "Green" ,
[Quality KPI] <= 0 && [Quality KPI] >= -0.1 , "Yellow" ,
[Quality KPI] < 1 , "Red" )

 

 

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@Mous007 

May be this way: 

Quality KPI switch = 
SWITCH(
    TRUE(),
    [Quality KPI] < -0.1 , "Green" ,
    [Quality KPI] <= 0 && [Quality KPI] >= -0.1 , "Amber" ,
    [Quality KPI] > 1 , "Red" 
)

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

amitchandak
Super User
Super User

@Mous007 , a color measure like given below can used in conditional formatting with field value option

 

quality KPI color = SWITCH(TRUE(),
[Quality KPI] < -0.1 , "Green" ,
[Quality KPI] <= 0 && [Quality KPI] >= -0.1 , "Yellow" ,
[Quality KPI] < 1 , "Red" )

 

 

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.