Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to fill null cell with previously stored values with the help of month. in my table i have 3 columns Product, Month and cost so each product has 4 months respectively like apr, may, jun & july for A product and same for B,C,D and E product so what i want whichever cell has null value that should be filled with cost of previous month value.
the requirement is shown in output column.
Something along the lines of:
LOAD Product,
Month
If(Len(Cost) = 0 And Product = Previous(Product),
Alt(Peek(Cost), 0), Cost) as Cost
Resident .....
Order by Product, Month;
The ordering will work if loading from a qvd, or a resident load. This also assume that month is a proper month field (not a string) that can be sorted normally)