Forum Discussion
imjeed
2 years agoFrequent Visitor
Help to find difference time with current and next row
Hi all, Need a help to find the difference time between the current and next row that have the same ID, below are scenarios: I have a category of transactions with date, time, and amount. ...
- Anonymous2 years ago
Hi imjeed
Thanks for the reply from rajendraongole1 .
imjeed , the following measure is for your reference.
Measure = VAR _min = CALCULATE(MIN([Time]), ALLEXCEPT('Table', 'Table'[Category])) VAR _date = MIN('Table'[Date]) RETURN CALCULATE(SUM('Table'[Amount]), FILTER(ALLEXCEPT('Table', 'Table'[Category]), [Date] = _date && [Time] <= _min + TIME(0, 30, 0)))Output:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi imjeed
Thanks for the reply from rajendraongole1 .
imjeed , the following measure is for your reference.
Measure =
VAR _min = CALCULATE(MIN([Time]), ALLEXCEPT('Table', 'Table'[Category]))
VAR _date = MIN('Table'[Date])
RETURN
CALCULATE(SUM('Table'[Amount]), FILTER(ALLEXCEPT('Table', 'Table'[Category]), [Date] = _date && [Time] <= _min + TIME(0, 30, 0)))
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.