Forum Discussion
Conditional formatting for cards visual
- 5 years ago
Hi Anonymous
You might want to adjust the color for the selected value, it's currently light blue when selected. I wasn't sure what you meant by 'darker' - the background or the font? I think it stands out more as it is.
In the attached file are 3 measures to indicate if the associated card value is selected or not e.g.
TAS Color = IF(ISFILTERED('Table'[Savings]), IF(SELECTEDVALUE('Table'[Savings])="Total Actual Savings",1,0),2)This is then used in a Conditioanl Formatting rule
The color measures and rules are almost identical for the other 2.
Regards
Phil
Anonymous , if you want to color car visual
if(selectedvalues(Slicer[value]) = "Total potential saving", "grey", "white")
You can use conditional formatting with field value option.
other examples
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"))
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