Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We are using variables in the script as per the below,
LOAD *,
Dual (If ([Delivery Difference Days] > 0,
If ([Delivery Difference Days] <= 5, 'Week or Less',
If ([Delivery Difference Days] <= 10, 'Two Weeks or Less',
If ([Delivery Difference Days] <= 20, 'Month or Less',
If ([Delivery Difference Days] <= 40, 'Two Months or Less', 'Over Two Months'))))),
If ([Delivery Difference Days] > 0,
If ([Delivery Difference Days] <= 5, 1,
If ([Delivery Difference Days] <= 10, 2,
If ([Delivery Difference Days] <= 20, 3,
If ([Delivery Difference Days] <= 40, 4, 5)))))) as [Late Status];
LOAD [Sales Document Item Key],
Sum ([Date Type]) as [Delivery Difference Days]
GROUP BY [Sales Document Item Key];
LOAD [Sales Document Item Key],
ApplyMap ('Factory Calendar Map', [Original Factory Calendar] & '-' & Num ([Original Planned Delivery Date] + Iterno ()), 0) as [Date Type]
WHILE Num ($(vMinDate) + Iterno ()) <= Num (Today ());
LOAD [Sales Document Item Key],
[Original Factory Calendar],
[Original Planned Delivery Date]
RESIDENT [Order Delivery]
WHERE Num ([Original Planned Delivery Date]) < Num (Today ()) AND (Isnull ([Comparison Date]) OR (RangeSum ([Delivered Quantity Punctuality]) - RangeSum ([Original Confirmed Quantity])) < 0);
We have declared the created variable in the Variable Overview section as
min(Date([Original Planned Delivery Date]))
However, an error Unknown load statement occurs repetitively.
Could you, please suggest on this.
Thanks
Hi @deepaktibhe
Try like below
Load min(Date([Original Planned Delivery Date])) as MinDate resident yourDeliveryDateAvailableTableName;
Let vMinDate = Peek('MinDate');
Instead of create in front end.
Hi,
I tried with the above condition. However, the same error persists.
Thanks
Hi @deepaktibhe
Can you send the sample data with ur script.