Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sergio3
Partner - Contributor III
Partner - Contributor III

expression as string in if clause

Hi, mates.

Help me.

How to put expression as string in if clause?

For example:

IF(vTEST=0, SUM(x),0)

Expression in chart:

SUM(Y)+$(vTEST) 

vTEST need to be like 'SUM(x)', like SET in script.

Thanks!

 

1 Solution

Accepted Solutions
gf
Creator III
Creator III

Have a look at this simple program for better understanding.

View solution in original post

3 Replies
gf
Creator III
Creator III

Hello Sergio,

I would use two variables.

vTest and vTest2.

vTest is your number and in vTest2 you check vTest with  =IF(vTest=0,Sum(x),0)

Then you can calculate with vTest2 like  =Sum(y)+$(vTest2)

 

Regards,

gf

gf
Creator III
Creator III

Have a look at this simple program for better understanding.

Sergio3
Partner - Contributor III
Partner - Contributor III
Author

Thank u sir!