Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Guys. I am working on a report which requires me to do coditional format based on 3 different dates:
In the image below I want to define the first grey box by a date, then the greens/purples by another date and then a third and final date to end the greens. effectively what I'm trying to do is show the contract period in the greens and with the grey show the time between likely award date and start date.
Solved! Go to Solution.
@azakir , You need create a color measure based on date/measure etc. And use that in conditional formatting using field value option
example
Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) < date(2022,04,10) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .75 , "Amber" ,
"Red "
) ,Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"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")
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...
@azakir , You need create a color measure based on date/measure etc. And use that in conditional formatting using field value option
example
Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) < date(2022,04,10) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .75 , "Amber" ,
"Red "
) ,Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"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")
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...
Hi @amitchandak
Thanks for this, this helps. Would this work if we are working on three different date fields?
User | Count |
---|---|
131 | |
108 | |
101 | |
67 | |
64 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |