on ‎2025 May 29 12:04 PM
I have use case for manual forecasting from excel sheet to SAC where based on each invoice date needs to have 30 days in payment date having same invoice amount for each payment date. I tried using FOR EACH AND NEXT but it not as per expected format. Attached screenshot. Thank you
Note: We are using Invoice date and payment date in model. Happy to get ideas on how DSO can replace the manual way of forecasting.
Request clarification before answering.
Hi @Astra1562
Please refer to the script below.
MEMBERSET [d/Company_Code] = "A"
MEMBERSET [d/Date] = "2025-01-01" TO "2025-01-31"
MEMBERSET [d/Region]="EMEA"
INTEGER @Counter
INTEGER @PaymentDays
@PaymentDays = %Payment_Days%-1
FOR @Counter = 0 to @PaymentDays
DATA([d/Measures]="InvoiceAmount",[d/PaymentDate]=NEXT(@Counter,"DAY",%Start_Payment%)) = RESULTLOOKUP([d/Measures]="InvoiceAmount",[d/PaymentDate]="")
ENDFORI hope this is helpful to you, and if I have misunderstood anything, please feel free to reach out.
Moonjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.