Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello
I would like to fill a cell within a table if a date is present that occurred within the past 30 days as green and if it's more than 30 days fill with red.
The column is called 'Incidents'[IN Last Comment], I understand this will need a measure to be created then added as conditional formatting?
Solved! Go to Solution.
Hi @Anonymous
You can create a measure
e.g
Format = var a=DATEDIFF(SELECTEDVALUE('Incidents'[Date]),TODAY(),DAY)
return IF(a>0&&a<=30,"green","red")
Then put it to the conditional formatting of the [in last comment] field
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
You can create a measure
e.g
Format = var a=DATEDIFF(SELECTEDVALUE('Incidents'[Date]),TODAY(),DAY)
return IF(a>0&&a<=30,"green","red")
Then put it to the conditional formatting of the [in last comment] field
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes. Put that measure in a visual, then:
Click that little FX
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.