Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following Load code that result in the table shown.
DRP:
LOAD @1:27 as part_key,
@230:239 as [week 1],
@254:263 as [week 2],
@278:287 as [week 3],
@302:311 as [week 4]
FROM [$(sLastFile)] (fix, codepage is 1252)
WHERE @52:55='B';
Item Number | [week 1] | [week 2] | [week 3] | [week 4] |
52Z4351703001 | 112 | 60 | ||
52Z4351720001 | 112 | 60 | ||
52Z28124086001 | 112 | 60 | 60 | |
52Z28161011001 | 112 | 60 | ||
PEFR9254A1 | 12 | 12 | 12 | 17 |
What I want to achieve is to aggregate the amount starting with week 1. Would like the following resulting table;
Item Number | [week 1] | [week 2] | [week 3] | [week 4] |
52Z4351703001 | 112 | 172 | ||
52Z4351720001 | 112 | 172 | ||
52Z28124086001 | 112 | 172 | 232 | |
52Z28161011001 | 112 | 172 | ||
PEFR9254A1 | 12 | 24 | 36 | 53 |
Is there any simple code for this. Given that it's 52 weeks I'd prefer not to use the following code;
DRP:
LOAD @1:27 as part_key,
@230:239 as [week 1],
@230:239+@254:263 as [week 2],
@230:239+@254:263+@278:287 as [week 3],
@230:239+@254:263+@278:287+@302:311 as [week 4]
FROM [$(sLastFile)] (fix, codepage is 1252)
WHERE @52:55='B';
Thankful for any help!
Best regards,
Jonas
The table shows production demand Part Numbers per week. What I want to accomplish is to sum the Production Demand within the Lead Time of the part.
I.e. if the Lead Time for part number PEFR9254 is 3 weeks I want to
sum([week 1]+[week 2]+[week 3]) = SUM(12+12+12) = 36
The lead time is different for different part numbers.
Jonas