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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I would like to show a timer that shows 'number of days' past the event.
So if the event occurred Oct 5,
on Oct 6 - the timer should show 1.
Enhancement (if possible)-
If I can show past day, hour, minutes
Solved! Go to Solution.
=TODAY() - [Event Date]
=NOW() - [Event Date/Time]
use FORMAT to show the desired output.
Not completely sure what is the ask. Is this something that you are looking for ? I have expressed the ourtput in terms for hours.
No of Hours since last event =
VAR _Dt =
MAX ( Events[Date] )
VAR _tbl =
FILTER ( ALL ( Events ), Events[Date] < _Dt && Events[Event Occurred] =1 )
VAR _Dt1 =
MAXX ( _tbl, Events[Date] )
RETURN
DATEDIFF ( _Dt1, _Dt, HOUR )
hi, You can use the following code to achieve your goal, dont forget to replace the column names with your owns
Time Past =
VAR __Now = NOW()
VAR __EventDate = [EventDate]
RETURN
FORMAT(__Now - __EventDate, "d \d\a\y\s\ h\ \h\o\u\r\s\ m\ \m\i\n\u\t\e\s")
Create a Date Table
DateTable =
CALENDAR ( MIN ( 'YourTable'[EventDate] ), TODAY () )
Create a Measure for Days Passed
DaysPassed =
VAR EventDate =
DATE ( 2024, 10, 5 ) // Replace with your event date
RETURN
DATEDIFF ( EventDate, TODAY (), DAY )
Add a card visualization to your report and set its value to the DaysPassed measure. This will show the number of days since October 5.
Create a Detailed Timer Measure
DetailedTimer =
VAR EventDate =
DATE ( 2024, 10, 5 ) // Replace with your event date
VAR CurrentDateTime =
NOW ()
VAR TotalMinutes =
DATEDIFF ( EventDate, CurrentDateTime, MINUTE )
VAR Days =
INT ( TotalMinutes / 1440 ) // Total minutes in a day
VAR Hours =
INT ( MOD ( TotalMinutes, 1440 ) / 60 ) // Remaining hours
VAR Minutes =
MOD ( TotalMinutes, 60 ) // Remaining minutes
RETURN
FORMAT ( Days, "0" ) & " days "
& FORMAT ( Hours, "0" ) & " hours "
& FORMAT ( Minutes, "0" ) & " minutes"
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Create a Date Table
DateTable =
CALENDAR ( MIN ( 'YourTable'[EventDate] ), TODAY () )
Create a Measure for Days Passed
DaysPassed =
VAR EventDate =
DATE ( 2024, 10, 5 ) // Replace with your event date
RETURN
DATEDIFF ( EventDate, TODAY (), DAY )
Add a card visualization to your report and set its value to the DaysPassed measure. This will show the number of days since October 5.
Create a Detailed Timer Measure
DetailedTimer =
VAR EventDate =
DATE ( 2024, 10, 5 ) // Replace with your event date
VAR CurrentDateTime =
NOW ()
VAR TotalMinutes =
DATEDIFF ( EventDate, CurrentDateTime, MINUTE )
VAR Days =
INT ( TotalMinutes / 1440 ) // Total minutes in a day
VAR Hours =
INT ( MOD ( TotalMinutes, 1440 ) / 60 ) // Remaining hours
VAR Minutes =
MOD ( TotalMinutes, 60 ) // Remaining minutes
RETURN
FORMAT ( Days, "0" ) & " days "
& FORMAT ( Hours, "0" ) & " hours "
& FORMAT ( Minutes, "0" ) & " minutes"
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
hi, You can use the following code to achieve your goal, dont forget to replace the column names with your owns
Time Past =
VAR __Now = NOW()
VAR __EventDate = [EventDate]
RETURN
FORMAT(__Now - __EventDate, "d \d\a\y\s\ h\ \h\o\u\r\s\ m\ \m\i\n\u\t\e\s")
Not completely sure what is the ask. Is this something that you are looking for ? I have expressed the ourtput in terms for hours.
No of Hours since last event =
VAR _Dt =
MAX ( Events[Date] )
VAR _tbl =
FILTER ( ALL ( Events ), Events[Date] < _Dt && Events[Event Occurred] =1 )
VAR _Dt1 =
MAXX ( _tbl, Events[Date] )
RETURN
DATEDIFF ( _Dt1, _Dt, HOUR )
=TODAY() - [Event Date]
=NOW() - [Event Date/Time]
use FORMAT to show the desired output.
How do I pass the event date to the measure
Past Days = TODAY() - dt"2024-10-21"
(i hope you meant 2024, not 2025)