Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey All!
I need your help with the data set (as an example I put it in excel):
What I need is to fetch during of calculation for field "Purge" the fileds above calculated (for example cell D10).
Is there function in Qlik Sense which let me to do it?
I know that above() works only in table/chart, but is there an option to do it in my script?
Gr
1) drop the single quotes.
2) you'll need to add if(rowno() = 1). Because row 1 returns null, and you can't subtracting null after that resulting in null. try this/update row1 as you need:
If(rowno() = 1, 0, (Stock-30-peek(Purge,-1)) ) as Purge
You can use peek() for this.
When I do like this, result is null for field "Purge"
Test:
Load
Day
Stock
Inbound
(Stock-30-peek('Purge',-1)) as Purge
From.....
1) drop the single quotes.
2) you'll need to add if(rowno() = 1). Because row 1 returns null, and you can't subtracting null after that resulting in null. try this/update row1 as you need:
If(rowno() = 1, 0, (Stock-30-peek(Purge,-1)) ) as Purge
It's working, Thanks a lot!