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

relational operators in expressions

I was trying to use the <> in an expression as per the Help file

it didn't work but -= did work as not equal

now I want to use greater than - the help file says > , >=, < , <= etc

none of these work - is the help file wrong? it certainly was for the not equal to !!

1 Solution

Accepted Solutions
pover
Partner - Master
Partner - Master

I assume you're talking about set analysis which has a different syntax than the conditional statement of an if so instead of using sum(if(Year>2000,Amount)) you have to put sum({$<Year={">2000"}>} Amount).

Regards.

View solution in original post

6 Replies
pover
Partner - Master
Partner - Master

I assume you're talking about set analysis which has a different syntax than the conditional statement of an if so instead of using sum(if(Year>2000,Amount)) you have to put sum({$<Year={">2000"}>} Amount).

Regards.

Not applicable
Author

Thanks for the reply - it works

<PRINCIPAL_ID = {"<>4"}>

but misses some values and doesn't give me the same results as- misses out some data

<PRINCIPAL_ID -= {4}>

do I need the $ sign at the beginning of the set analysis?

pover
Partner - Master
Partner - Master

<PRINCIPAL_ID = {"<>4"}> is not a valid search as QlikView will interpret the <> as less than and greater than. The result will be all PRINCIPAL_ID's greater than 4. The syntax -= is what you want to use. You can also use <PRINCIPAL_ID = {"=not match(PRINCIPAL_ID,4)"}>

Am I missing some other detail of what you are looking for?

Not applicable
Author

Thanks

The only other question is what would I use if i wanted greater than 2

or if I wanted greater than or equal to 2

pover
Partner - Master
Partner - Master

If you want PRINCIPAL_ID to be greater than 2 it would be

<PRINCIPAL_ID = {">2"}>

and greater than or equal to 2 would be

<PRINCIPAL_ID = {">=2"}>

Regards.

Not applicable
Author

Thank you very much - it all works fine now

Regards