Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Need Help with if statement and variable

Hello all together,

I need an upper barrier which depends on a counter of lines ($(i)).

i Tried to set the barrier like this:

if (($(i) = $(vNoOfRows)), set $(bisFrageZeilennr) = $(vbishöchsteZeilennr));

Unfortunately this doesn't work.

Can someone tellme where I made a mistake ?

Best regards

Purlax

1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: Need Help with if statement and variable

Ok,

now I combined your advices to a working line.

if $(i) = $(vNoOfRows) then

set bisFrageZeilennr = $(vbishöchsteZeilennr);

ENDIF

Thank you very much for your help !

Best regards

Purlax33

View solution in original post

4 Replies
Highlighted

Re: Need Help with if statement and variable

if (($(i) = $(vNoOfRows)), set bisFrageZeilennr = $(vbishöchsteZeilennr));

set assign a value (a variable in this case) to a new variable identifier that is defined without $(..)

Highlighted
Partner
Partner

Re: Need Help with if statement and variable

Hi,

Where you creating the this Condition.

You can't able to create variable in load.

else you are creating outer of load use below syntex.

Ex:

if $(i) = $(vNoOfRows) then

set $(bisFrageZeilennr) = $(vbishöchsteZeilennr);


ELSEIF;

Not applicable

Re: Need Help with if statement and variable

Thanks for your replies.

Unfortunately nothing of this works.

The comma is always underlined red and Qlikview tells me Fehler.JPG.

The "set" gives me a similar answer.

: (

Here is the whole file

Highlighted
Not applicable

Re: Need Help with if statement and variable

Ok,

now I combined your advices to a working line.

if $(i) = $(vNoOfRows) then

set bisFrageZeilennr = $(vbishöchsteZeilennr);

ENDIF

Thank you very much for your help !

Best regards

Purlax33

View solution in original post