Forum Discussion
Weekly Comparison vs Previous Year into KPI Visual
Hi Allison,
Thanks very much for your reply.
I had previosuly tried all 3 versions, but I went back and it seems that DATEADD works fine.
However, I am getting fictisious results for Week 18 & 19.
(Unable to post images due to Data Protection).
I have been trouble-shooting in my data and have explored it in Excel and the figures shown using DateAdd are incorrect.
Is there anything you can suggest that might cause an issue with 2 of 19 results?
Seems very strange.
Many thanks,
Hello @TomBurke ,
In essence, DATEADD expects a date table column as the first parameter like most Time Intelligence functions, which are designed to work with date/calendar tables (date dimensions). Time Intelligence,
For example,and ou have this table called MyDates
If you use DATEADD to create a calculated column named 4MonthsAfter:
4MonthsAfter = DATEADD(MyDates[Date],4,MONTH)
Return this:
As you can see column 4MonthsAfter for date 24/08/2016 value is blank since the column does not contain 24/12/2016 value, the same is true for 24/01/2017 because there is no value 24/05/2017. But 4 months after 24/09/2016 is calculated from 24/01/2017 is present in the column.
In addition, you can consult this article on the difference between Dateadd, ParallelPeriod and SamePeriodLastYear:
DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Weather Intelligence Question
Mejores looks,
Yingjie Li
If this post helps, please consider accepting it as the solution to help other members find it more quickly.