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: 
khigaurav999
Creator
Creator

Not Equal To with Variable

Hi Friends & Community Members,

I am new to QV. I need to change the caption of text object/button object depending upon value of a variable. Basically, I want caption to be Show CR Details when var_Active_CR_Details -='Y' otherwise Hide CR Details.I


I tried following expression: =if(var_Active_CR_Details -='Y','Show CR Details','Hide CR Details') but this is giving syntaxt error.

Also tried followings:

=if(var_Active_CR_Details ='*' - 'Y','Show CR Details','Hide CR Details')
and =if(var_Active_CR_Details ={'*'}-{'Y'},'Show CR Details','Hide CR Details')

but it also doesn't work and help me achive what i want.

Please let me know how can i achieve it. Thanks for your help with this in advance.

Gaurav

1 Solution

Accepted Solutions
avinashelite

try this

=if(var_Active_CR_Details <>'Y','Show CR Details','Hide CR Details')


in if condition not equal to us <>

in set analysis -=


Hope you got the answer

View solution in original post

3 Replies
avinashelite

try this

=if(var_Active_CR_Details <>'Y','Show CR Details','Hide CR Details')


in if condition not equal to us <>

in set analysis -=


Hope you got the answer

sunny_talwar

You can also use not Match() function here

=If(not Match(var_Active_CR_Details, 'Y'), 'Show CR Details', 'Hide CR Details')

or you can turn around the if statement to check if it is Y

=If(var_Active_CR_Details = 'Y', 'Hide CR Details', 'Show CR Details')

khigaurav999
Creator
Creator
Author

thanks this is working!