Forum Discussion
Kumshan450
8 years agoHelper III
Calculate difference between two date/time values using current row minus previous row
how to calculate the time difference between two consecutive rows (current row - previous row) in a Column data COLLECTION DTM In sample data. Thereafter i want to check whether the differen...
Phil_Seamark
8 years agoMicrosoft Employee
HI Kumshan450
If you add the following calculated column to your table, it will show the number of seconds between the current and previous row, which you can then use in an IF statement to
Seconds Diff =
VAR StateName = '2018'[State Name]
VAR BranchName = '2018'[Branch Name]
VAR CurrentCollectionDTM = '2018'[Collection DTM]
VAR PreviousCollecitonDTM =
MAXX(
FILTER(
'2018',
'2018'[State Name] = StateName &&
'2018'[Branch Name] = BranchName &&
'2018'[Collection DTM] < CurrentCollectionDTM
),
'2018'[Collection DTM]
)
RETURN IF( DATEDIFF(PreviousCollecitonDTM,CurrentCollectionDTM,SECOND)<60,1,0)
- Kumshan4508 years agoHelper III
Hi, Its unable to handle large volume of data.
- Phil_Seamark8 years agoMicrosoft Employee
How many rows in your data table?
- Kumshan4508 years agoHelper III
I have 20 lakh rows of data