Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vchuprina
Specialist
Specialist

How make good scenarios?

I have some problem with operator if ...else if.

If in my script i have inserted "If -operator". For these reason main script doesn't work correctly

Structures of my script:

(1)If (department = 1) then

  N =......

  if a=...  then  (inserted )  

end if

----------------------------------------

(2) Else if (department = 2) then

N =......

  if a=...  then  (inserted )  

.....

--------------------------------------

(3) Else if (department = 3) then

N =......

  if a=...  then  (inserted )  

.....

How use If ... else? Is there any way to control script? Maybe some function like "goto" in C++?


Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
1 Solution

Accepted Solutions
datanibbler
Champion
Champion

Hi,

the keywords "ENDIF" close off the IF THEN clause - so any ELSE or ELSEIF elements must be before that.

HTH

Best regards,

DataNibbler

View solution in original post

2 Replies
datanibbler
Champion
Champion

Hi,

the keywords "ENDIF" close off the IF THEN clause - so any ELSE or ELSEIF elements must be before that.

HTH

Best regards,

DataNibbler

timanshu
Creator III
Creator III

Hi,

Can You explain completely about the issue. If it's possible, Kindly attach screenshot/ QVW to show the exact script you are writing.