Forum Discussion
Error - Calculate + sameperiodlastyear
- 3 years ago
Attached is the basic framework.
- modify your source data to include a date column
- add a Dates table to your data model
- create the SPLY measure from the Dates date column.
Note that this will not be useful for "Period To Date" reports. To account for partial periods you need to do additional work.
Thank you for your answer and sorry for my late reply, I just came back from leave.
Hereunder you will find the data I'm using
This is what I've got so far
| Year | Sales | Sales LY |
| 2020 | 473 | |
| 2021 | 802 | |
| 2022 | 1874 | |
| 2023 | 1757 | |
| TOTAL | 4906 |
And this is what I'm expecting
| Year | Sales | Sales LY |
| 2020 | 473 | |
| 2021 | 802 | 473 |
| 2022 | 1874 | 802 |
| 2023 | 1757 | 1874 |
| TOTAL | 4906 | 3149 |
Thank you for your help
Attached is the basic framework.
- modify your source data to include a date column
- add a Dates table to your data model
- create the SPLY measure from the Dates date column.
Note that this will not be useful for "Period To Date" reports. To account for partial periods you need to do additional work.
- Onclevini3 years agoRegular Visitor
Hi There,
You are a super star, thank you.