Forum Discussion
michaelstone
Helper I
7 years agoStrange behaviour with SAMEPERIODLASTYEAR
Hi, I'm building a Power BI report which is analysing PoS transaction data so have a fact table (Transactions) with every individual transaction including timestamp and sales amount (Transactions...
- 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
suryaburaboyina
7 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
michaelstone
Helper I
7 years agoHi 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