Forum Discussion
Mous007
Helper IV
6 years agoConditional formatting with DAX for all columns
Hi all, I am trying to conditionally format all the columns on my table. I can do each column manually but i am trying to be more efficient as i have more than 25 columns on my tables. All th...
- 6 years ago
Mous007 ,
Create a color measure like the give example
Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) <today(),"lightgreen","red") Color Date = var _min =minx(allselected(Date,Date[Year]) return Switch( true(), FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen", FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue", "red") if(FIRSTNONBLANK(Table[Value],"true")= "true","green","red")Use this with field option in color formatting of all the columns
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
amitchandak
Super User
6 years agoMous007 ,
Create a color measure like the give example
Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) <today(),"lightgreen","red")
Color Date =
var _min =minx(allselected(Date,Date[Year])
return
Switch( true(),
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen",
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue",
"red")
if(FIRSTNONBLANK(Table[Value],"true")= "true","green","red")
Use this with field option in color formatting of all the columns
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