Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How is the syntax for a WHERE ID IN (1,2,3,4) in QlikView

Hello I have a Problem Im new to Qlik and normaly Im using SQL.

So im trying to figure out how to write something like SUM(CASE WHEN ID=1 AND XID IN (1,2,3) THEN SALES ELSE NULL END AS SALES in Qlik?

Thank you for your time.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum(If(Match(XID, 1, 2, 3) and ID = 1, SALES))

View solution in original post

4 Replies
sunny_talwar

May be this:

Sum(If(Match(XID, 1, 2, 3) and ID = 1, SALES))

Not applicable
Author

Hello thx that worked already.

sunny_talwar

Or this:

Sum({<XID = {1, 2, 3}, ID = {1}>} SALES)

swuehl
MVP
MVP

But remember, latter will only work in the front end (chart expressions), not in the script (if that's where you want to use it?).

A Primer on Set Analysis