Forum Discussion
wasequesiddiqui
9 years agoRegular Visitor
Improper Functioning of PreviousYear Function
I am trying to get the sales of Previous Year but somehow previousyear function is not giving me the desired result. [LY Sales Col] is my previous year sales column.
- 9 years ago
You need to create a calendar table and create relationship between these two tables with Date key. Then use PREVIOUSYEAR Function (DAX) like below.
LY Sales = CALCULATE ( SUM ( SALESSHEET[Sales] ), PREVIOUSYEAR ( 'Calendar'[Date] ) )
Best Regards,
Herbert
wasequesiddiqui
9 years agoRegular Visitor
I have tried changing the column for previousyear function still it is not working