Forum Discussion

jimbob2285's avatar
jimbob2285
Icon for Advocate IV rankAdvocate IV
3 years ago
Solved

Create an activity chase table from an activity fact table and date table

Hi Everyone   I'll try and word this as concisely as I can... I have a fact table of activities, as well as a Date table (that goes into the future) - I need to create a new fact table of activity ...
  • ToddChitt's avatar
    ToddChitt
    3 years ago

    In the CROSS JOIN, do not filter the Dim Date table. That gets you a Chase date for every day of the week for every Chase Activity. Wrap your final FILTER in another FILTER where the WEEKDAY of the Chase Activity = the WEEKDAY of the Dim Date column:

    FILTER (

        FILTER ( CROSS JOIN (

                  FILTER ( Activity..."In Progress"),

                   'Dim Date'

                  )

         , 'Dim Date' [My Date] >= TODAY()

        )

       WEEKDAY ( 'Activity'[Date] ) = WEEKDAY ('Dim Date'[The Date] )