Forum Discussion
find conflicts across date ranges
We have data for tasks being completed within a date range and are going to show this on one of the gantt chart visuals.
I woudl also like to highlight any that are conflicting over the same day but are struggling to get it to work, ive tried a few things from the forums but cant quite get them to display what i would like.
Data in the tables looks like
Ive created a conflicting column using
as you can see on the 14/04/2022 some are showing true but some are showing false.
2 Replies
- amitchandak
Super User
Try a new column
new column =
var _cnt = countx(filter(Table, ([Start Date] >= earlier([Start Date] ) && [Start Date] <= earlier([End Date] )) || ([End Date] >= earlier([Start Date] ) && [EndDate] <= earlier([End Date] ) ), [Event_Ref])
return
if(isblank(_cnt), false(), True())
- Kerslaing
Helper I
Thanks,
I tweaked it a bit so it excluded the current record it was on,
conf =VAR IDCurrent= 'Changes (5 Year History)'[Event_Ref]var _cnt = countx(filter('Changes (5 Year History)', ([Scheduled_Start] >= earlier([Scheduled_Start]) && [Scheduled_Start] <= earlier([Scheduled_End]) && [Event_Ref] <> IDCurrent) ||([Scheduled_End] >= earlier([Scheduled_Start]) && [Scheduled_End] <= earlier([Scheduled_End]) && [Event_Ref] <> IDCurrent)), [Event_Ref])returnif(isblank(_cnt), false(), True())but its still not working correctly
as R1088910 rusn from 19/11 to 3/12 i would expect the 4 above that to be true.