Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm trying to use the peek function in the script. Basically I have one value in the first month and I want to populate this down.
The issue peek function is having some aleatory issue and I cannot have this visible down.
The expression is the following =
if(isnull(DataPrice), Peek (DataPrice), DataPrice) as PricePeek, |
ordered by Date
Please see below the expected results:
The files with the script are enclosed.
Thanks in advance, Leadro
As suggested by Ioannis.
try
if(isnull(DataPrice), Peek (PricePeek), DataPrice) as PricePeek,
Peek does not work that way. You might look at Previous.
My suggestion is that what you do is:
As suggested by Ioannis.
peek expects the field name to be a string.
Try:
peek('DataPrice')
Also peek will return null on the first record.
Isn't the price wrong for Supplier A?
For supplier A per logic 2000 gets applied where ever there is a null. not sure what the desired output should be though.