Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Not applicable
Author

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
alexandros17
Partner - Champion III
Partner - Champion III

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 $(..)

kumarnatarajan
Partner - Specialist
Partner - Specialist

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
Author

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

Not applicable
Author

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