Forum Discussion
Overlapping Data
- Anonymous3 years ago
Hi keylian031987 ,
Please try this column:
Column = VAR _start_date1 = 'Table'[Start Date] VAR _employee = 'Table'[Employee Backup] VAR _start_date2 = CALCULATE ( MIN ( 'Table'[Start Date] ), FILTER ( ALL ( 'Table' ), 'Table'[Employee Name] = _employee ) ) VAR _end_date1 = 'Table'[End Date] VAR _end_date2 = CALCULATE ( MAX ( 'Table'[End Date] ), FILTER ( ALL ( 'Table' ), 'Table'[Employee Name] = _employee ) ) VAR _result = IF ( OR ( AND ( _start_date2 >= _start_date1, _start_date2 <= _end_date1 ), AND ( _end_date2 >= _start_date1, _end_date2 <= _end_date1 ) ), "Overlapping", "Non Overlapping" ) RETURN _resultBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi keylian031987 ,
Please try this column:
Column =
VAR _start_date1 = 'Table'[Start Date]
VAR _employee = 'Table'[Employee Backup]
VAR _start_date2 =
CALCULATE (
MIN ( 'Table'[Start Date] ),
FILTER ( ALL ( 'Table' ), 'Table'[Employee Name] = _employee )
)
VAR _end_date1 = 'Table'[End Date]
VAR _end_date2 =
CALCULATE (
MAX ( 'Table'[End Date] ),
FILTER ( ALL ( 'Table' ), 'Table'[Employee Name] = _employee )
)
VAR _result =
IF (
OR (
AND ( _start_date2 >= _start_date1, _start_date2 <= _end_date1 ),
AND ( _end_date2 >= _start_date1, _end_date2 <= _end_date1 )
),
"Overlapping",
"Non Overlapping"
)
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
God! Thank You! This worked perfectly!