Forum Discussion
Time intelligence Past year sales
Hi ANE2 ,
Thanks to aduguid for their replies, allow me to provide another insight:
The dateadd function returns a table that contains a column of dates that move into the future or into the past at specified intervals from the date in the current context. It must be a date that already exists in the table; if you don't have a date from a year ago in your table, it will return null.
You can see this example. I have these dates in my table.
To get the date three years from now, it returns null.
To get the date three days from now, it would return data that already exists in the table.
To get the date one year ago, you can use an expression similar to the following.
Measure =
DATE(YEAR(MAX('Table'[date]))-1,MONTH(MAX('Table'[date])),DAY(MAX('Table'[date])))
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-kaiyue-msft, thank you for your responses. The issue I am facing is that for example this year my current week starts on the 4th and ends on the 10th while last year this same period started on the 5th and 11th. When I filter my current week period from 4th to 10th, I don't get the right result of 5th to 11th last year as well. This is what I am trying to solve