Forum Discussion

AllanBerces's avatar
AllanBerces
Icon for Post Prodigy rankPost Prodigy
1 year ago
Solved

Dynamic Date pass 2 weeks and advance 2 weeks

Hi good day can anyone help me on how can i make my date on my column chart be dynamic from pass 2 weeks and advance two weeks (for lookahead plan). I have two table Plan and Actual and both are conn...
  • johnt75's avatar
    1 year ago

    Add a column to your calendar table which you can then use as a filter on the column chart.

    You could create the column in SQL, Power Query or DAX. Sample DAX might be

    Within 4 week window =
    'Calendar'[Date]
        >= TODAY () - 14
        && 'Calendar'[Date]
            <= TODAY () + 14
    

    You can make the logic as simple or complex as you need to, perhaps working with week starting and ending dates.

    Add the new column as a filter on your chart to only show when the column is true.