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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Help for Conditional Formating

Hello,

 

I want the values under the months to be green if they are lower R21, Blue if they are between R21 and B22, and red if they are higher than B22.

 

koray_0-1654081465062.png

like this:

koray_1-1654081682621.png

 

Thank you,

1 ACCEPTED SOLUTION
NickolajJessen
Solution Sage
Solution Sage

Allright, your "data" isn't really data. It's already a report. You should consider transforming your data to a more appropriate format.

That being said, here's how to do it with your current format.

Create a measure than checks if its lower than R21 or higher than B22 as below

NickolajJessen_3-1654085208291.png

 

 

Use the measure to format the specific coloum. Note that you need to do this to every column. jan, feb, mar, etc.

NickolajJessen_2-1654084850396.png

 

View solution in original post

9 REPLIES 9
NickolajJessen
Solution Sage
Solution Sage

Allright, your "data" isn't really data. It's already a report. You should consider transforming your data to a more appropriate format.

That being said, here's how to do it with your current format.

Create a measure than checks if its lower than R21 or higher than B22 as below

NickolajJessen_3-1654085208291.png

 

 

Use the measure to format the specific coloum. Note that you need to do this to every column. jan, feb, mar, etc.

NickolajJessen_2-1654084850396.png

 

Anonymous
Not applicable

hi @NickolajJessen 

 

Measu like as below:

color =
var C1 =SWITCH(
SUM(Sheet1[January]) < SUM('Table 1 (KPI2022)'[R21]), TRUE(), 1) //one is green

var C2 =SWITCH(
SUM(Sheet1[January]) < SUM('Table 1 (KPI2022)'[B22]), TRUE(), 2) //one is green

Return
COALESCE(C1,C2,3)
 
second part is like as below:
koray_0-1654088214389.png

when i done second part it gives error

koray_1-1654088262546.png

 

What is wrong?

It seems you have more than one table, as you are summing on sheet1 and table one

I'm gonna try and ask this again:

How is your data structured?




Anonymous
Not applicable

Hi @NickolajJessen 

 

Excel file: 

koray_0-1654151654555.png

Pbi:

koray_1-1654151690263.png

 

SUM(Sheet1[January]) < SUM('Table 1 (KPI2022)'[R21])

How is you data loaded into Power Bi? I see you are referencing Sheet1 and Tabel 1 (KPI2022)

Do you have more than one table? Can you send a screenshot of your datamodel?

Anonymous
Not applicable

Hi @NickolajJessen 

 

Yes my fault you are totally right. Sorry for this. It's fixed now, thank you very much.

 

koray_0-1654156858627.png

 

 

But now I realized that in some values, I need to color the opposite.

We did this:

I want the values under the months to be green if they are lower R21, Blue if they are between R21 and B22, and red if they are higher than B22.

But on some of my values, I want to colorize the opposite. I will try to explain in more detail.

We said that if the value is greater than R21, the background should be green. Yes this is true for some fields eg Oee, rft micro etc.

But this is not true for energy, waste, water. It has to be red for them. For this reason, can I differentiate it by specifying Area?

Sure, you can add an additional condition

NickolajJessen_0-1654158080696.png

 

NickolajJessen
Solution Sage
Solution Sage

What type of visual is this? How is you data structured?

Anonymous
Not applicable

Hello @NickolajJessen 

 

Coming from excel to pbi table.

koray_0-1654083032523.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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