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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Conditional Formatting

Hello,

 

I'm trying to set up some conditional formatting for my measure. I'm not having luck with the normal rules option for formatting, so I'm wondering if there is a work around.

 

My situation is that I have %'s that range from -900% to 900%. I want to color anything that is -20% or below red and anything that is 20% or higher red. 

 

Any help on this would be great! 

5 REPLIES 5
Tahreem24
Super User
Super User

@Anonymous ,

Please follow the below screen shots:

1.PNG2.PNG3.PNG

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Anonymous ,

Follow my above post and also for rest of the values other than -200% please follow the below screen shot:

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
amitchandak
Super User
Super User

@Anonymous , you can create a color measure . Use that in conditional formatting after selecting "field"

example

Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))

 Refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

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
Anonymous
Not applicable

Hey @amitchandak 

 

I was able to put together this formula and it's working for anything that's a positive number, is there a way I can get it to read for negatives too? I tried to make it read as an absolute value, but that didn't help.

 

IF([Actual Quantites vs Prior Year %]>ABS(.20),"Red","Green")

@Anonymous , it should be like this

IF(ABS([Actual Quantites vs Prior Year %])>.20,"Red","Green")

 

But might advice would be to create a separate condition for +ive and -ive number

 

like

switch(true(),

[Actual Quantites vs Prior Year %])>.20 ,"Red",

[Actual Quantites vs Prior Year %])<-.20 ,"Red",

"Green")

 

Correct logic as per need

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors