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

## Re: DATEDIFF between Rows and GROUP BY

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

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

20 REPLIES 20
Super User

## Re: DATEDIFF between Rows and GROUP BY

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

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

Super Contributor

## 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

## Re: DATEDIFF between Rows and GROUP BY

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

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

Super User

## 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!

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

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 6 members 1,085 guests
Recent signins: