Forum Discussion
Relative Date issues
I am filtering to see last 13 months:
I can see the dates but why does it do this?
Its Oct 23 now sow 13 months I would expect Sep 22 to Oct 23. So full months.
But I don't get full months:
Filtered
Without filter:
So relative date will not work to get full months? Only at the end of month october 23?
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
3 Replies
- danextianSuper User
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 - VillezekevikingMost Valuable Professional
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.