2 weeks ago - last edited 2 weeks ago
Hello,
I want to write a data action which copy the data into next year based on the current week. Below is an example assuming my current week is 202503:
| Retail Week | Version | Amount |
| 202601 | LY | 2000 |
| CY | 3000 | |
| NY | 2000 | |
| 202602 | LY | 4000 |
| CY | 5000 | |
| NY | 4000 | |
| 202603 | LY | 6000 |
| CY | 7000 | |
| NY | 7000 | |
| 202604 | LY | 8000 |
| CY | 9000 | |
| NY | 9000 | |
| 202605 | LY | 10000 |
| CY | 11000 | |
| NY | 11000 |
Assuming my current week is 202503, so my requirement is to copy the data from Version LY to NY till 202602 and from Version CY to NY from 202603 onwards.
I tried to write below code in SAC data action, but it didn't copy anything in next year, because the range in the scope is not correct.
Do we have any function which gives me date for next year of current week?
Request clarification before answering.
You example is not clear enough to advise you a code.
2026-01-01" TO PERIOD(TODAY()) , If we are in 2025 the start date range is higher then the end range. May be you should explain clearly what you want to copy and where you want to copy to.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@N1kh1l:
My requirement is to copy the data of 2026 from one version to another version based on the current week of 2025.
For example in my above screenshot, i am assuming that my current week is 202503, so i want to copy the data of 202601, 202602 from the version LY to NY but for the week 202603, 202604, 202605 and so on i want to copy data from version CY to NY.
The code which i provided is not working because my date range is not correct. Initially i put below code:
MEMBERSET [d/Date] = "2025-01-01" TO PERIOD(TODAY())
DELETE()
DATA()= RESULTLOOKUP([d/Version]="public.LY").
So this was working fine for the data of year 2025. But i want same flexibility for the data of year 2026.
I hope i am clear this time.
Thanks,
Saif
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.