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: 
Not applicable

What is the syntax for "NOT"?

Does QV have a "NOT" operator? I searched the manual a bunch of times and found no reference to it as a chart function, only a script function.

I just want to do a simple if(NOT flag,etc.)  It would make the formulas simpler and easier to maintain. I tried NOT(flag), I tried if(NOT flag,). Surely it has this simple function!

1 Solution

Accepted Solutions
MayilVahanan

Hi

PFA

You can see set analysis and not operator

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
Not applicable
Author

You can use <> or - depending on where you need it.  For example, in set analysis Sum({$<Flag-={"1"}>} Sales) will pull all sales where Flag does not equal 1. Or, If(Flag<>1,Sum(Sales)) will pull all sales where Flag is not equal to 1. Is that what you are asking?

Anonymous
Not applicable
Author

It depends on your "flag".  Say, flag is 1, than:

if (flag=0, A, B)

Besides, is your condition without NOT is this:

if(flag, A, B)

As NOT you may use, in most cases:

if(flag, B, A)

Regards,

Michael

MayilVahanan

Hi

PFA

You can see set analysis and not operator

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Geez, I tried if(not flag,..) this morning, and it would not accept the formula.

I think my computer has gremlins; it wouldn't let me enter formulas in Excel either.

Non-deterministic computers scare me.