Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kerslaing
Helper I
Helper I

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

Kerslaing_0-1669897753833.png

Ive created a conflicting column using 

 
Conflicting =
VAR StartDate = 'Changes (5 Year History)'[Scheduled_Start]
VAR EndDate = 'Changes (5 Year History)'[Scheduled_End]
VAR IDCurrent= 'Changes (5 Year History)'[Event_Ref]
RETURN
IF (
COUNTROWS(
FILTER (
ALL('Changes (5 Year History)'),
'Changes (5 Year History)'[Scheduled_Start] >= StartDate &&
'Changes (5 Year History)'[Scheduled_End] <= EndDate &&
'Changes (5 Year History)'[Event_Ref] <> IDCurrent
)
) > 0, TRUE(), FALSE())
 
 
But its not doing what it should
Kerslaing_1-1669897887935.png

 

as you can see on the 14/04/2022 some are showing true but some are showing false.

 
 
2 REPLIES 2
amitchandak
Super User
Super User

@Kerslaing ,

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())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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])
return
if(isblank(_cnt), false(), True())

 

 

but its still not working correctly

 

Kerslaing_0-1669975602466.png

 

as R1088910  rusn from 19/11 to 3/12 i would expect the 4 above that to be true.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.