Forum Discussion
Strange behaviour with SAMEPERIODLASTYEAR
- 7 years ago
Hi michaelstone ,
Sorry for my mistake.
Please modify the measure Total Sales - Previous Year like below.
Total Sales - Previous Year = SUMX ( 'Calendar', CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) ) )Here is the output.
Best Regards,
Cherry
Hi michaelstone ,
By my test and research based on your pbix, I'm afraid that you should create the table with the date column from Calendar table like below so that you could get the correct output.
Best Regards,
Cherry
Hi,
It is working fine wheni tried, if didnot set the Date columns with same format please do that.
Below is hte screenshot for same.
mark it correct, if its useful.
Thanks,
Surya Teja
- michaelstone7 years agoHelper I
Hi suryaburaboyina ,
I don't understand what you mean by "did not set Date column with same format".
As per my instructions, the problem only occurs when you include the last day of data in the slicer i.e. 17 July 2019.
Thanks,
Michael