Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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

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