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: 
suryaa30
Creator II
Creator II

Qlikview equivalent for SQL "IN" function

Hi All,

assuming I have 200 products and based on some calculation I have narrowed down certain products assigned to a variable using concat function and whose output can vary in number.

I have a calculated variable that generates the output as ('Shoe','Pen','Pencil'..........)

vWantedProduct=CONCAT({SET Expression} Product)

My question is assuming I have a straight table and with Dimension as product and some expressions.

What needs to be done to limit the dimensions in straight table only to those values corresponding to the values in vWantedProduct.

if the number of values in vWantedProduct was few and static I could have used IF else condition, but now it is dynamic.

How do I proceed?

for example:Assuming we had "IN" function in qlikview just for understanding. below should be my calculated dimension.

IF( Product is IN(vWantedProduct) then Product)

1 Solution

Accepted Solutions
sunny_talwar

Alternatively, you can try this

If(Match(Concat(TOTAL {SET Expression} Product), Product), Product)

View solution in original post

3 Replies
sunny_talwar

May be use set analysis

Sum({<Product = {$(=Concat({SET Expression} Product))}>} Measure)

I believe that you already have a way to get single quotes around the list of products, so use the dollar sign expansion without any single or double quotes

sunny_talwar

Alternatively, you can try this

If(Match(Concat(TOTAL {SET Expression} Product), Product), Product)

suryaa30
Creator II
Creator II
Author

Let me just check this. Thanks Much