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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

What does -(Field='Y') means?

I have a field with 2 possible values: Y / N

What does it mean to type -(Field = 'Y') ?

Thanks!

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

It will return 1 if the value is Y. (Field = 'Y') will return true if the value of Field is Y and the value of true is -1. By multiplying it with -1, e.g. the minus sign in before the parentheses you get 1.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Anonymous
Not applicable

if that is within an if statement, then it means you are checking if Field equals Y.

so the following statement in a text box will return "Field is Y" or "Field is N" depending on the selection.

=if(Field = 'Y', 'Field is Y', 'Field is N')

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

It will return 1 if the value is Y. (Field = 'Y') will return true if the value of Field is Y and the value of true is -1. By multiplying it with -1, e.g. the minus sign in before the parentheses you get 1.


talk is cheap, supply exceeds demand