The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 the columns should have a background color based on the following rules:
1) Show red background color for any column cell with a value <> Blank OR value > 0
2) show green or no color background color for any color cell = Blank
A screen shot is also provided below.
Is there any possible way i can format all column at once without having to do it individually for each column please ?
Any leads/hints would be highly appreciated.
Best,
Mous
Solved! Go to Solution.
@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-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Thank you guys.
Seems like some manual work is inevitable in this situation ...
@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-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
18 | |
18 | |
15 | |
13 |
User | Count |
---|---|
41 | |
35 | |
22 | |
22 | |
17 |