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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

counter to display the number of days since the last event in a list

 

Hello, I am trying to create a counter to display the number of days since the last event in a list (industrial accident for example) and that this be dynamic depending on the choice of the OU or team selected. What the counter should display according to the attached example: Without filter: 1 day (last event on 01/21) Filter on UO2: 12 days (last event on 01/10) Filter on Team2-1: 20 days (last event on 02/01) Any idea on how to go about it? Many thanks in advance.

image (1).png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Create a measure like this and try

datediff(diffmaxx(allselected(Table), Table[Date]), today(), day)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

HotChilli
Super User
Super User

Write a measure to get the MAX 'Date de l'evenment' - put it on a card

 

This will respond to your filter or slicer.

 

Test it. See that it works.

 

Write a 2nd measure - Assign the  current day (UTCTODAY or NOW()) to a variable

Assign the 1st measure to a variable.

Using DATEDIFF, subtract the 2nd variable from the 1st variable.

 

Put it on a card

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

Write a measure to get the MAX 'Date de l'evenment' - put it on a card

 

This will respond to your filter or slicer.

 

Test it. See that it works.

 

Write a 2nd measure - Assign the  current day (UTCTODAY or NOW()) to a variable

Assign the 1st measure to a variable.

Using DATEDIFF, subtract the 2nd variable from the 1st variable.

 

Put it on a card

amitchandak
Super User
Super User

@Anonymous , Create a measure like this and try

datediff(diffmaxx(allselected(Table), Table[Date]), today(), day)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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