Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Background colour formatting.

Hi All

I have a dashboard where I need the background of a cell to reflect a certain colour depending on the contents of it. The rules are as follows.


It works well mostly. But there are some times when it reflects the wrong colour as shown below, the top right "Not Approved" should be in red, not yellow:




0=Not Approved=Red



Super User
Super User


Let's assume you are using a measure for the Approval Status. You can create a measure for the conditional formatting like:

Condit. format =

[Approval Status] = "Not Approved", 0,

Approval Status] = "Approved", 1,


Now use this measure in the conditional formatting interface -select the measure in the "based on the field" option- 

Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.

Super User
Super User

@sthandiwe , need to check data for that. Can you share sample data and sample output in a table format? Or a sample pbix after removing sensitive data.


Can you create a color measure directly on values like in the given example and use that with the "Field Value" option(in place od rule


color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions




Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors