Forum Discussion
Relative Date issues
- 2 years ago
Hi rpinxt ,
The last x months relativie date filter is relative to the current day and does not include full months. The last x calendar months does include the full months but not if the current month if it isn't complete yet. You can create a calculated column to calculate the for the number of months from today, the current month being month 1 and the previous month being month 2, etc. Here's a sample formula:
Rolling Months from Today = DATEDIFF ( Dates[Date], TODAY (), MONTH ) + 1
I now this is already solved but I'm offering an alternative solution for those who might search and find this thread.
https://www.villezekeviking.com/dax-tables-calendar-and-time/
I have offset-columns from today that can be used to filter any report relative from today on days, weeks, months, quarters or years.
Unlike the relative date filtering, this can span any period, from historical data, over current periods and into the future.
You can use this in your scenario to filter on months to get full calendar months.
-1 is prev month, -2 the month before that etc.