Hello,
There is existing SAP note which shows how to do aggregation of last n periods in current month. I want to have similar calculation for the past buckets. Below is the sample calculation from SAP Note
IF(("PERIODID0" >= "$$PERIODID0CU$$" -6) AND "PERIODID0" < "$$PERIODID0CU$$", "SALESqty@MTHPROD", NULL)
Here "$$PERIODID0CU$$" is referring to current month. What I want to do is do similar calculation from Past bucket, let say start from last year in weekly bucket. So what should I use instead if CU to refer past bucket.
Note: This will be dynamic and rolling calculation starting from past to current bucket.
Regards
Ankur
Hi Ankur,
Can you try $$PERIODI0CU$$ - 52? Given the PERIODID0 is define for weekly buckets.
Best
Alecsandra
Hi Alecsandra
I have model my calculation as below
IF(("PERIODID0" >= "$$PERIODID0$$" - 53) AND "PERIODID0" < "$$PERIODID0CU$$" , "HROLL11A@WKPRODSALESREGSEAGRP", NULL)
I know this will be valid for current bucket, but will be valid for past bucket also. We have a requirement where we want to calculate value in past bucket and save it in past bucket only.
Regards
Ankur