Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey I am a beginner to Qlik and need some help with the if script. When I try this code it gives an error. Can someone help me with it?
Hi @ITStagiair
The syntax is Different in Qlik.
If num = 1 then 1 else 0 is written IF(NUM=1,1,0) The then and else and just replaced by ','.
I don't understand how to change my script with this syntax. When I change the syntax it still gives an error.
Hi @ITStagiair
I could be wrong, but your error is in the “next()” as this I think it doesn’t exists. You can read the current and previous row but not next.
So, using flags, you should read comparing current and previous and then with a resident load and ordering in the opposite direction comparing again de current with previous.
bit complicated to explain, I hope you got the idea.
best,