Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Conditional Form at date that occurred in past 30 days

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?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

vxinruzhumsft_0-1694498728635.png

Output

vxinruzhumsft_1-1694498739485.png

 

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.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

vxinruzhumsft_0-1694498728635.png

Output

vxinruzhumsft_1-1694498739485.png

 

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.

 

chonchar
Helper V
Helper V

Yes. Put that measure in a visual, then:

Click that little FX

 


 Updating Media

 

chonchar_0-1694100908857.png

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors