cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Time Different in the same column

Hi All,

 

How I can get the time different for time_tz column between each row (in the same column) using DAX

 

TimeDiff.png

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Time Different in the same column

@Anonymous , Try like

Diff = datediff(maxx(filter(Table, [time_tz]<earlier([[time_tz]])),[time_tz]),[time_tz],hour)

Or add the subgroups
Diff = datediff(maxx(filter(Table, [time_tz]<earlier([[time_tz]]) && [device_name]<earlier([[device_name]])),[time_tz]),[time_tz],hour)

 

change unit of time hour as per need



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Super User IX
Super User IX

Re: Time Different in the same column

See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Anonymous
Not applicable

Re: Time Different in the same column

datediff_error.png

 

Hi, I am getting this error.

 

Thanks

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors