Forum Discussion
Dynamic Date pass 2 weeks and advance 2 weeks
- 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 () + 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.
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.
- AllanBerces1 year ago
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
- johnt751 year ago
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 ||.
- AllanBerces1 year ago
Post Prodigy
Hi johnt75 thank you very much, now working perfectly.