Forum Discussion
michaelstone
7 years agoHelper I
Strange 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
v-piga-msft
7 years agoResident Rockstar
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
michaelstone
7 years agoHelper I
This seems like a workaround for an underlying bug but will accept as the solution.
Thanks v-piga-msft