Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All.
Im currently attempting to apply conditional formatting to a date colum where the formatting is applied to turn the cell red when the date entered is 2 months or more before the current date. I'm unsure if I need to create a new column in order to do this, and if so what formula should I be using.
Any help would be much appreciated.
Regards,
Alaya
Solved! Go to Solution.
You can create a flag column using today()-60:
Flag = IF([Date]<=TODAY()-60,1,0)
You can create a flag column using today()-60:
Flag = IF([Date]<=TODAY()-60,1,0)
@AlayaLove , Create a measure like
Color Date =
var _min = date(year(today()),month(today())-2,day(today())) // date(year(today()),month(today())-2,1)
var _max = date(year(today()),month(today())+2,day(today())) // date(year(today()),month(today())+2,1)
return
if(FIRSTNONBLANK('Date'[Date],blank) >= _min && FIRSTNONBLANK('Date'[Date],blank) <= _max ,"red","lightgreen")
And use it with field option in color formatting
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
82 | |
71 | |
64 |
User | Count |
---|---|
115 | |
105 | |
95 | |
79 | |
72 |