Hello,
I need to create a filter which will automatically give me the information for the last 12 complete months. For example, since today is January 4, 2018, I need to exclude January thus far.
Could I accomplish this with something like:
_month_of_year ( [Date] ) between
_month_of_year ( _add_days ( current_date, -X ) )
and
_month_of_year ( _add_days ( current_date, -X ) )
Thanks
This might work for you:
[Date] between
_first_of_month ( _add_months ( current_date, -12 ) )
and
_last_of_month ( _add_months ( current_date, -1 ) )
And if your date dimension has a first day of month and last day of month column, you can use those in Lynn's suggestion to have a bit fewer functions.
Thanks,
I ended up getting it to work with this filter:
[Date] >_first_of_month (_add_months (current_date,-12))
and
[DateVisit
< _last_of_month (_add_months (current_date,-1))