I am considering whether to add a column called ‘this_year_before_today’ to my date table. The purpose of this column would be to identify whether a date falls within the current year up to today.
Here’s the formula I would be using for the calculated column:
this_year_before_today = IF(YEAR([date]) = YEAR(TODAY()) && [Date] <= TODAY(), TRUE(), FALSE())
Until now, I’ve been relying on two filters to visualize data for this date period:
- Relative date “is this year”: This filter restricts the visual to the current year, including dates after today.
- Relative date “is in the last year": This filter restricts the visual to dates before today.
However, I find both solutions somewhat cumbersome. Is there a more efficient way to achieve this?
I can use either filters for each visual, create a column in my date table, or insert filtering in DAX measures