Forum Discussion

jake_BIVisual's avatar
jake_BIVisual
Frequent Visitor
5 years ago
Solved

Schedule Matching Strategy using DAX

I have an interesting business problem that I would like to use DAX to solve and was wondering if anyone has attacked something similar. I am at an intermediate level for DAX, and was looking more fo...
  • jake_BIVisual's avatar
    jake_BIVisual
    4 years ago

    Anonymous  I appreciate it.

    The solution:

    I took a variation of DAXERS approach with by creating a TimeTable down to the minute:
    [Index] [Time XX:XX:00]

    I then created Table Variables in this pattern:

    tblAvailabilityClient: Filtered TimeTime for Clients Available Times
    tblAvailabilityProvider: Filtered TimeTable for Providers Available Times

    tblScheduleClient: Filtered TimeTable for Clients existing Schedule
    tblScheduleProvider: Filtered TimeTable for Clients existing Schedule

    tblClientOpen= Except (tblAvailabilityClient,tblScheduleClient): Filtered only the remaining availability after accounting for what is already scheduled.
    tblProviderOpen=Except (tblAvailabilityProvider,tblScheduleProvider): Filtered only the remaining availability after accounting for what is already scheduled.

    tblMatches= Intersect(tblClientOpen,tblProviderOpen): Filtered for only those times that are open for both the client and provider.


    That is the base pattern, then I iterated over the effective dates.