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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
dw700d
Post Patron
Post Patron

conditional formatting card while comparing dynamic columns

I am trying to  do conditional formatting on a card with columns from two seperate tables.  Column 1 = "pace of funds spent". Column 2 = "Days to spend funds". I would like to apply conditional formating which changes the bankground of column 1 to red if the value is higher than column 2 and then green if the value is lower than column 2. The value of these columns will change every day. I think card with states may be an option but i dont know how to do the formatting against dynamic values. I read the documentation but I havent found the way. anyone have suggestions?

 

Contribition   pace of fund spent
Contribution 1          775
contribution 2          887

 

ContribitionDays to spend funds
Contribution 1          733
contribution 2           917
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dw700d ,

You can have color measure and use that in conditional formatting with the field option

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

 

refer

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

1 REPLY 1
amitchandak
Super User
Super User

@dw700d ,

You can have color measure and use that in conditional formatting with the field option

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

 

refer

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors