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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I calculate a veriable based on an expression in a straight table?

All I want to do is make a variable called vShipFlag evaluate to true or false (1 or 0) based on an expression in a straight table. Is this possible? I've tried adding it as an expression ex. If(statement, vShipFlag = 1, vShipFlag = 0) but it does not work.

Thanks for the help,

Alex

2 Replies
erichshiino
Partner - Master
Partner - Master

I think you shoud go to variable overview (settings -> Variable overview), then create the vShipFlag with the expression:

=if( statement, 1,0)

Then, when you need, you use the variable (for example, in an expression) like this:

= $(vShipFlag)

Hope it helps,

Erich

Not applicable
Author

Thanks Erich, however when I define the variable with that expression in the variable overview it calculates with that expression. I want the expression in the table to define the variable ( I cannot use the same expression I'm using in the table and use it in the variable overview because it will not work right). Do you know if this is possible?