Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need help with <{}> sintax

Hi, i want to make an expression like "SQL Not In sentence".

i.e. "Select field From table Where key not in(value1,value2,..valueN)"

i've been reading about and i found "<{}>", but i can't understand how it works.

may somebody help me to undesrtand it please?.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Now is clear!

The only way to replace an if is:

if(Wildmatch(field,'x','y','z')=0, otherField)

View solution in original post

8 Replies
alexandros17
Partner - Champion III
Partner - Champion III

The syntax you have seen is called set analysis and is used in expression, not in script, you request is performed by:

Load *

where wildmatch(Key, 'value1','value2',..'valueN')=0;

Select field From table;


Remember the ";" at the end of the load

TKendrick20
Partner - Specialist
Partner - Specialist

This is called "set analysis" and it is how QV filters data in aggregation expressions without making explicit selections in the dashboard.

For instance, if I wanted to take the SUM of the field SALES, but not including PRODUCT values 1, 2, and 3 you could do something like this:

SUM({$<PRODUCTS -= {'value1', 'value2', 'value3'}>} SALES)

Things to note are that you can only do this in aggregated expressions (you can get similar functionality out of nested if statements). I suggest you take a look at the QV reference manual, and I've added a link below to a great tool called the Set Analysis Wizard which makes things a little easier.

Set Analysis Wizard for QlikView | qlikblog.at

Not applicable
Author

Thanks Alessandro, but i want to make it into an expression

may you explain me that please?

Ragards.

MK_QSL
MVP
MVP

Select * From TableName

Where Not WildMatch(Key, 'value1','value2',..'valueN');

alexandros17
Partner - Champion III
Partner - Champion III

Expressions (and dimensions) are usen in visual objects like tables, chart, text boxes and so on, what you are trying to do is loadind data from a source using a condition. it is not possible to load data in objects taht is in expression

Not applicable
Author

I'm trying to make this into an chart expression "if( field<>'x' and field<>'y' and field<>'z', otherField)"

i only want to make it shorter because there are many comparisons inside it.

Thanks!

alexandros17
Partner - Champion III
Partner - Champion III

Now is clear!

The only way to replace an if is:

if(Wildmatch(field,'x','y','z')=0, otherField)

Not applicable
Author

Ok many thanks!