Forum Discussion
minimynt
10 years agoFrequent Visitor
DAX Last Year Sales
Hi, I want to create LY Sales calculation, but somehow there's something wrong with the result. The total of LY Sales is right, but I don't have any idea why LY sales for each year is not showin...
- Anonymous10 years ago
Hello, try this instead: LY Sales = CALCULATE([Total Sales], SAMEPERIODLASTYEAR('Orders'[Order Date]))
If you have a dedicated date table, you'll want to use the date column from there instead of Order Date
- 10 years ago
Anonymous Hi, I've also tried with SAMEPERIODLASTYEAR but the result is the same. However, I just figured out that only continuous date is valid for this case and my OrderDate isn't continuous so that's why.
Thanks anyway! :)