cancel
Showing results for
Did you mean:
Regular Visitor

## DATEDIFF between Rows and GROUP BY

Hello everybody. 2 DAX Questions about DATEDIFF.

1)I need to find the difference in minutes between the rows of "DateTime" column

2)I need to find the difference in minutes between the rows of "DateTime" column GROUPING BY "IWC Number"

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV

## Re: DATEDIFF between Rows and GROUP BY

here is the output i see on my end from your data

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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

20 REPLIES 20
Super User IV

## Re: DATEDIFF between Rows and GROUP BY

when you said difference, you mean difference in minute from current row datetime to previous row datetime

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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Microsoft

## Re: DATEDIFF between Rows and GROUP BY

HI @Giavo

When you group by IWC number, what dates do you want to compare?

Proud to be a Datanaut!

Regular Visitor

## Re: DATEDIFF between Rows and GROUP BY

Yes exactly, difference(in minutes) between row and row+1(i guess i should use DATEDIFF but i can't obtain the correct result.

Regular Visitor

## Re: DATEDIFF between Rows and GROUP BY

after having the first formula (datediff between row and row+1), i would like to see if i can sum this Minutes(datediff) for each "IWC Number". thanks

Super User IV

## Re: DATEDIFF between Rows and GROUP BY

do you mean difference between row and (row -1), not row + 1

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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Regular Visitor

## Re: DATEDIFF between Rows and GROUP BY

Isn't it the same thing?

Regular Visitor

## Re: DATEDIFF between Rows and GROUP BY

yes you're right. Row and Row - 1

Highlighted
Super User IV

## Re: DATEDIFF between Rows and GROUP BY

Can you paste the data so that i can use that for calc instead of the image you pasted, or share excel file (using google drive or other means). cheers!

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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Regular Visitor

## Re: DATEDIFF between Rows and GROUP BY

yes sure, thank you for helping

 ProgressiveIndex IWC Number DateTime Status 1 100 13/10/17 7:10 1 2 100 13/10/17 9:04 3 3 100 13/10/17 9:10 3 1 103 13/10/17 9:18 2 2 103 14/10/17 9:21 5 3 103 14/10/17 9:31 7 1 106 14/10/17 9:50 31 2 106 14/10/17 10:09 21 3 106 14/10/17 11:02 43

Announcements

#### Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors