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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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