Forum Discussion
czuniga
6 years agoHelper III
Dynamic Conditional Formatting
I'm tring to add conditional colors to columns based on what's less than/greater than a dynamic parameter value. Any ideas on how to do it? Adding a column with dynamic values seemed promising, but I...
- 6 years ago
You can create a dynamic color measure. In place of static values, you can replace with value from the slicer
Color Date = if(FIRSTNONBLANK('Date'[date],TODAY()) <today(),"lightgreen","red") Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red") Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))Use fields option under conditional control and choose a measure like this. Refer :https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
amitchandak
6 years agoSuper User
You can create a dynamic color measure. In place of static values, you can replace with value from the slicer
Color Date = if(FIRSTNONBLANK('Date'[date],TODAY()) <today(),"lightgreen","red")
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK('Date'[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK('Date'[Year],2014)>2018,"red","yellow"))
Use fields option under conditional control and choose a measure like this. Refer :https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
czuniga
6 years agoHelper III
Worked perfectly. Thank you!
- amitchandak6 years agoSuper User
czuniga , please mark the solution that worked for you.