I'm trying to populate missing values of the dates in between with peek
function. I'm used the following code but still I couldn't get the results I'm looking for
Table:
LOAD * INLINE [
Date, Article, Quantity
01/02/2021, A, 10
03/02/2021, A, 20
06/02/2021, B, 30
07/02/2021, C, 40
];
Join(Table)
LOAD
Date(MinDate+IterNO ()-1) as Date
While
(MinDate+IterNO ()-1) <= Num(MaxDate -1)
;
LOAD
Min(Date) as MinDate,
Max(Date) As MaxDate
Resident
Table
;
Join(Table)
Load
If( Len(Quantity) = 0, peek('newQuantity'), Quantity) as newQuantity
Resident
Table
;
Thank you so much for your help