Hi,
I am trying to calculate the duration between the earliest and last timestamps in a day for each person.
Group Name Login Time Logout Time
1 Ben 2/5/2015 8:00 2/5/2015 9:00
1 Ben 2/5/2015 13:00 2/5/2015 18:00
2 Amy 2/5/2015 8:00 2/5/2015 18:00
Formulas
First Login:=MIN(table1[Login Time])
Last Logout:=MAX(table1[Logout Time])
Duration:=1*SUMX(table1,[Last Logout]-[First Login])
The results I am getting Ben in the pivot is
Group Name First Login Last Logout Duration
1 Ben 2/5/2015 8:00 2/5/2015 18:00 6:00:00
2 Amy 2/5/2015 8:00 2/5/2015 18:00 8:00:00
Grand Total 14:00:00
The results I am expecting is,
Group Name First Login Last Logout Duration
1 Ben 2/5/2015 8:00 2/5/2015 18:00 8:00:00
2 Amy 2/5/2015 8:00 2/5/2015 18:00 8:00:00
Grand Total 16:00:00
The concern now is the duration and grand total part.
Any help would be appreciated.
Thanks
I am trying to calculate the duration between the earliest and last timestamps in a day for each person.
Group Name Login Time Logout Time
1 Ben 2/5/2015 8:00 2/5/2015 9:00
1 Ben 2/5/2015 13:00 2/5/2015 18:00
2 Amy 2/5/2015 8:00 2/5/2015 18:00
Formulas
First Login:=MIN(table1[Login Time])
Last Logout:=MAX(table1[Logout Time])
Duration:=1*SUMX(table1,[Last Logout]-[First Login])
The results I am getting Ben in the pivot is
Group Name First Login Last Logout Duration
1 Ben 2/5/2015 8:00 2/5/2015 18:00 6:00:00
2 Amy 2/5/2015 8:00 2/5/2015 18:00 8:00:00
Grand Total 14:00:00
The results I am expecting is,
Group Name First Login Last Logout Duration
1 Ben 2/5/2015 8:00 2/5/2015 18:00 8:00:00
2 Amy 2/5/2015 8:00 2/5/2015 18:00 8:00:00
Grand Total 16:00:00
The concern now is the duration and grand total part.
Any help would be appreciated.
Thanks