Forum Discussion
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 connected to my calendar table, something like this
Thank you
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 () + 14You 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.
4 Replies
- johnt75
Super User
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 () + 14You 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.
- AllanBerces
Post Prodigy
Hi johnt75 thank you for the reply, but when I try the DAX its show all True on my calendar table, even 2023
- johnt75
Super User
I made a silly mistake, it was an or condition not an and condition. I've edited my original post to use && instead of ||.