Hi Guys - I was wondering if someone could perhaps help.... I've spent a day on this, read just about every forum post, but I'm clearly missing something in relation to the SAMEPERIODLASTYEAR function.
I have a Transaction DB - Consumed into PowerBi via Odata
I have a seperate Calendar DB I created in PowerBi (Well formed)
On the transaction DB - I have created the following measures:
Sum of Sales --> Sum of Sales = SUM (Transactions[amount])
Year to Date Sum of Sales --> YTDSumOfSales = TOTALYTD([Sum of Sales],'CALENDAR'[Date])
Last Year Sales --> SalesLastYTD = CALCULATE([YTDSumOfSales], SAMEPERIODLASTYEAR('CALENDAR'[Date]))
For some reason the Last Year Sales Measure is moving the measure ahead; instead of behind (IE - 2018, insted of 2016) - Here is what the table of the data looks like the below.
Essentially I am trying to create some KPI Scorecards to show you how you are trading against Last YTD / Last MTD / Last WTD / This Week vs Last Year This Week / Today vs Today Last Year.
Any direction would be well recieved!
Solved! Go to Solution.
Thanks for pointing out the obvious to me. I ended up going in circles; and getting confused with the Sameperiodlastyear / parrallelperiod / dateadd..... But I realised I was being stupid, and after reading a few more articles, i figured it out.
This really helped: