Forum Discussion
Sameperiodlastyear function returning "Blank"
- 8 years ago
Its because in PBI Desktop you can not mark a table as date table. So the year slicer is not reset by sameperiodlastyear. The simplest was would be to adjust your measures.
Previous Year Sales = CALCULATE(Measure, SAMEPERIODLASTYEAR(Dates[date]), ALL(Dates))
- 8 years ago
I downloaded your file, adjusted the meuasure and it works now
Your measures seem about right. You should probably refer to 'd_date'[date] rather than d_date.date. You've spelt Calculate wrong but I assume that's just because you've typed it here.
CALCULATE( SUM( SalesValue ), SAMEPERIODLASTYEAR( 'd.date'[Date] ) )
Perhaps you're filtering in a way that's hiding the previous year data. I don't think that would usually cause problems though.
Take screenshots of your date table and the report page or upload a pbix somewhere.
- mwadhwani8 years ago
Kudo Kingpin
Hi emarc1,
Thanks for the reply.
As of now I have data for the month July-2016, July-2017, Aug-2016, Aug-2017 only.
Please find the attached pbix file in the below link:
https://www.dropbox.com/s/n1021gcd72unjsf/POC.pbix?dl=0
Thanks