Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I'm facing a challenge getting last year sales based on a last year date we have, I have to use this date for comparison so I can't use the AddYear() or any of the system functions because of some special cases that require this logic. Basically I have my table below, and I want to write an expression for a master item (Sales LY). I've simplified the question in the below table.
Date | Date LY | Sales | Sales LY |
27/04/2024 | 29/04/2023 | 1,000 | ? |
26/04/2024 | 28/04/2023 | 2,340 | ? |
25/04/2024 | 27/04/2023 | 1,291 | ? |
24/04/2024 | 26/04/2023 | 3,382 | ? |
23/04/2024 | 25/04/2023 | 3,928 | ? |
| | | | | | | |
| | | | | | | |
29/04/2023 | 30/04/2022 | 1,283 | ? |
28/04/2023 | 29/04/2022 | 3,728 | ? |
27/04/2023 | 28/04/2022 | 1,827 | ? |
26/04/2023 | 27/04/2022 | 3,827 | ? |
25/04/2023 | 26/04/2022 | 7,482 | ? |
if I put this master item in a table with the 3 already provided columns, the orange numbers would populate the question marks.
Appreciate your support 🙂
Hi
souds like this link is what your looking for :
As your last year date is equal to this year date - 364 you can use a pivot table between your fact table and your calendar table.
regards
Hi
souds like this link is what your looking for :
As your last year date is equal to this year date - 364 you can use a pivot table between your fact table and your calendar table.
regards
Thanks so much for the link, this method worked!