Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to calculate the days between operations in an order.
The table contains multiple Orders with each multiple operations.
So I use in the first step:
[Start Operation] - peek([End Operation],-1)) AS [DaysWaiting]
Until this point it works pretty well. But the first operation takes the End Date from the last operation of the previous order.
To fix this I thought it could be done with:
IF(%ORDER = previous(%ORDER),[Start Operation] - peek([End Operation],-1), null()) AS [DaysWaiting]
But it totally messes up the dates :-/. The table is sorted by Order, Operation ...
Has anybody a clue what I'm doing wrong?
Regards,
Peter
I had to do a resident load of the same table with "Order By ..." and now it works...
I had to do a resident load of the same table with "Order By ..." and now it works...