How do you increment a variable by +1 on a button click?

Eddy Jawed picture Eddy Jawed · Oct 10, 2013 · Viewed 7.4k times · Source

Hello kind helpful people,

I am having a major problem in Qlikview. I am just trying to create a button that can increment a variable by +1 each time it is clicked. I thought i could simply write an expression on a button click event but Qlikview is so different. I think it overcomplicates this matter by trying to be too simple. The only thing i can do is 'Set a variable' to a specific value in the button properties.

Does anyone know how to do this?

Many thanks

Eddy

Answer

bdiamante picture bdiamante · Oct 15, 2013

You can do this like you originally tried with an expression in the button action... the key is to make sure you put the = in there so vCount (or whatever your variable is called) gets evaluated first.

enter image description here