Create a date intersect

Hi,

I have two columns in my main table which shows dates from which a contract or a service was in place for, so it has a valid from date and a valid to date.

I want to be able to select one date and this would filter down to any contracts that were active during that time, so if I selected the 11/09/2019 I would get the below result

image

Dummy data in Power BI look like this

image

I have included a data table in my report but I’ve not created a relationship yet as I thought perhaps this might require a disconnected date table.

As always, any help/assistance very much appreciated.

Date Intersect v1.00.pbix (215.9 KB)

@DavieJoe Looks like you can leverage Events in progress DAX Pattern.

1 Like

@DavieJoe ,

You are spot on that this will require a disconnected date table. I actually did a video on nearly this exact scenario a couple of weeks ago. Give this a watch – I think it will give you what you need to solve this one. If you still have questions just give a shout…

– Brian

1 Like

Thanks @AntrikshSharma

Thanks @BrianJ (I knew you’d be awake :wink: :rofl: )

1 Like

@DavieJoe I have started suspecting that he might be Batman…

2 Likes

:bat: :man:

You’ve never seen them in the same place at the same time (events in progress :wink: )

1 Like

haha, something worth pondering upon.

Also if you have noticed he speaks slowly and has a heavy voice. Most importantly never uses his own face as display picture. hmmmmm

1 Like

Thanks @BrianJ this works perfectly.

I had previously watched this video but the olde brain hadn’t embedded the concepts, perhaps I need a memory upgrade. :computer:

Thinking on it a bit more, it’s quite a simple solution at its core but no less very powerful. Love the added bonus of using the measure for conditional formatting! :sunglasses:

@DavieJoe ,

Great – glad to hear that worked well for you.

That happens to me all the time. I’ll watch a video and think “hmmm, cool”, but it doesn’t fully click for me until I have an application of my own to use it on.

– Brian

1 Like

You’re right, now that I’ve actually applied it one of my reports I’ll definitely remember it now.