Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

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