Forum Discussion
Nanakwame
Helper II
4 years agoTime Intelligence YTD and Previous year calculation.
Hi Experts, I am creating a power bi sales dashboard with KPI's showing previous year sales, year to date sales and Variance indicating positive or negative. I will like the KPI to be time intell...
Nanakwame
Helper II
4 years agoThis is what have for sales PYTD
SalesPYTD = CALCULATE([SalesYTD],SAMEPERIODLASTYEAR('Date'[Date]))
It doesnt work for this formula
goncalogeraldes
Super User
4 years agoNanakwame I'll give you a few examples:
SalesPYTD = CALCULATE([SalesYTD],SAMEPERIODLASTYEAR('Date'[Date].[Date]))
SalesPYTD = CALCULATE([SalesYTD],DATEADD('Date'[Date], -1, year))
or alternatively:
SalesPY = CALCULATE([Sales], SAMEPERIODLASTYEAR('Date'[Date].[Date]))
SalesPYTD = TOTALYTD([SalesPY], 'Date'[Date].[Date])Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
- Nanakwame4 years ago
Helper II
I have the same dax function but it appears to be showing the full year previous sales instead of the same period.