cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dave_C
Resolver I
Resolver I

How can I get the amount of time between these events?

I have a table that tracks different status's.  I have created date and times, for each event.  I need to know how to get the amount of time between events.  

 

Capture.JPG

2 REPLIES 2
v-cherch-msft
Microsoft
Microsoft

Hi @Dave_C 

You may create measures like below.

Last_event_date = CALCULATE(MAX('Table1'[Date]),FILTER(ALL('Table1'),'Table1'[Index]=MAX('Table1'[Index])-1))
Measure = DATEDIFF([Last_event_date],MAX(Table1[Date]),HOUR)

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is the query that the my coder has built to get data into his world, but we need to get this up to the Power BI system to use.

This needs to be in a direct query model if at all posible

 

p1.png

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors