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 ,
Based on your information, I have made a test with your formula, I cannot reproduce your issue.
If it is convenient, could you share your data sample and so that we could help further on it?
You also could have a test on my test sample which has been attached below.
Best Regards,
Cherry
- michaelstone7 years ago
Helper I
Hi v-piga-msft ,
Here is a link to a file which shows the issue.
Note that the end date is now 17 July so you need to have this as the end date to see the issue.
Thanks,
Michael
- v-piga-msft7 years ago
Resident Rockstar
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
- suryaburaboyina7 years agoFrequent Visitor
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