Forum Discussion
Time intelligence add months to a given date
- 9 years ago
Hi franorio,
Please try the function Dateadd function, here is the link: https://msdn.microsoft.com/en-us/library/ee634905.aspx.
You can also use the formula to create a calculated column.Column = DATE(YEAR('Test1'[Date]),MONTH('Test1'[Date])+3,DAY('Test1'[Date]))
I use my sample data and get the expected result, please see the following screenhot. Then you can use the new date to create visual.
Thanks,
Angelia
DATEADD(<dates>,<number_of_intervals>,<interval>)
e.g.
DATEADD(DimCalendarTable[Date], 3, MONTH)
Be careful though - dealing with months (and weeks) can get tricky like when you need to add 3 months to Nov 30 (which would give Feb 30 which doesn't exist).
Also, this warning from the DAX Function Reference - "The result table includes only dates that exist in the dates column." So if your calendar table only goes through TODAY() for example, you may not get the results you are looking for.
Hope this helps
David