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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is the syntax for an 'if' statement in a conditional?

Hello,

I have a text box that I only want displayed if a variable is set to 'SH07'. I attempted this: =if(vReport='SH07',1,-1) but it does not work.  No matter what the variable is set to the text box is always displayed.  Anyone know the correct syntax?

Thanks,

Tyler

1 Solution

Accepted Solutions
Not applicable
Author

In the Show Conditional on the Layout tab put

vReport = SH07

Stephen

View solution in original post

5 Replies
Not applicable
Author

Try this:

Hope it helps!!

Not applicable
Author

Try this:

=if($(vReport) = 'SH07' , 1,-1)

Hope it Hepls!!

Not applicable
Author

Still no dice unfortunately, seems to always use the 'else'.  If I change it to =if($(vReport) = 'SH07',1,0) then it hides if vReport is set to 'SH09' or 'SH07' ... ?

Not applicable
Author

In the Show Conditional on the Layout tab put

vReport = SH07

Stephen

Not applicable
Author

Thanks, works great.  I was making it more complicated then it needed to be.