Forum Discussion
backflash
4 years agoHelper II
Calculate difference between two rows with dependencies
Hey All, hope someone can help me with the following: I want to calculate the difference between two rows - but I want to do this only for rows where some Column-values are the same. (btw: I al...
- 4 years ago
Hi backflash
Break Time = VAR CurrentStart = Table[Start] VAR CurrentEnd = Table[End] VAR PreviousEnd = MAXX ( FILTER ( CALCULATETABLE ( Table, ALLEXCEPT ( Table, Table[Emplyee Number], Table[Date] ) ), Table[End] < CurrentEnd ), Table[End] ) RETURN IF ( NOT ISBLANK ( PreviousEnd ), CurrentStart - PreviousEnd )
tamerj1
4 years agoCommunity Champion
Hi backflash
Break Time =
VAR CurrentStart = Table[Start]
VAR CurrentEnd = Table[End]
VAR PreviousEnd =
MAXX (
FILTER (
CALCULATETABLE (
Table,
ALLEXCEPT ( Table, Table[Emplyee Number], Table[Date] )
),
Table[End] < CurrentEnd
),
Table[End]
)
RETURN
IF (
NOT ISBLANK ( PreviousEnd ),
CurrentStart - PreviousEnd
)