Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Highlighted
qlikmark1990
Not applicable

Change a variable in LOAD statement except for the first row in field

I tried to update a variable in the LOAD statement for every row of a table that is loaded by using the statement except for the first row. A part of my script is:

LET startsaldoLiquideMiddelen = NUM(29700);

LOAD JaarWeek																				AS #JaarWeek,
NUM(NUM($(startsaldoLiquideMiddelen)) - NUM(CreditBedragOpen) + NUM(DebetBedragOpen), '#.##0')					AS SaldoLiquideMiddelen
RESIDENT Cashflow;

My goal is to create the field SaldoLiquideMiddelen that equals to 29700 for the first row and got the new value to insert in the second row. The third row needs the output of the formula where the second value is the input value. The fourth value is the output of the formula where the third value is the input and so on. How do I change the variable for each row except the first row?

Labels (2)
1 Reply
Gysbert_Wassenaar
Not applicable

Re: Change a variable in LOAD statement except for the first row in field

Perhaps like this

LET startsaldoLiquideMiddelen = NUM(29700);

LOAD 
JaarWeek AS #JaarWeek, NUM(If(RowNo()=1, $(startsaldoLiquideMiddelen) , Peek(SaldoLiquideMiddelen)) - NUM(CreditBedragOpen) + NUM(DebetBedragOpen), '#.##0') AS SaldoLiquideMiddelen RESIDENT Cashflow;

 


talk is cheap, supply exceeds demand