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:
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
I would create two columns in your date
table:
YearOffset
DayOffset
.
Then add two filters:
YearOffset = 0
DayOffset < 0
I use both of those fields a lot in various reports