I have a similar problem as discussed in How to expand dates with values. | Qlik Community, but slightly different. I also have tried to adjust the program code to my needs, but with no success.
What I have as base is the Excel file attached. I have Customer, Parts, a Valid_Date and the Price (Rows A-D)
What I want to achieve is shown in Row F (desired Result). I want to expand the Parts per Customer with the Price that lays between the two dates on a daily basis.
I have marked the "transition" per Customer/Part/Date regarding the two prices.
Maybe anyone can help me.
it's just an example of a continous date. The Date-Column is a kind of "From-Date", from where the price is valid. So the first Part (1234) can run til the end of time 🙂
May be this
LOAD * Inline [
LOAD *,If(Customer=Peek(Customer) and Part=Peek(Part),Peek(Date)-1,Date) as Date1
Order By Customer,Part,Date desc;
LOAD Customer,Part,Date(Date+IterNo()-1) as Date,Price
While Date+IterNo()-1 <= Date1;
Drop Tables Temp,Temp1;