Forum Discussion
Help: Using PREVIOUSYEAR() returns a Blank column...
- 6 years ago
Hi Anonymous ,
To use previous year function, you can create a continuous date table by this measure:
Table = CALENDARAUTO()
Then modify your measure like this:
goal = calculate(count(FactInternetSales[CustomerKey]),PREVIOUSYEAR('Table'[Date]))*1.05
You will get the following result:
Here is the demo , please try it:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hey Anonymous
Try using SAMEPERIODLASTYEAR instead: https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
Not sure what your data looks like, but I think all you need is to change out PREVIOUSYEAR with SAMEPERIODLASTYEAR
If this helps, pelase kudo
If this solves your problem please accept it as a solution.
I know how to use SAMEPERIODLASTYEAR instead; but I want to know how to use PREVIOUSYEAR?