Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

Use IN rather than = in a variable

I have a variable that SELECTS bottles.

sum({$<[PCC] ={"$(=concat([MCC],'","'))"},[RCPT] ={'Bottle'}>}[Amount]*-1)

I would like it to be able to select where it = bottle OR laptop

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({$<[PCC] ={"$(=concat([MCC],'","'))"},[RCPT] = {'Bottle', 'Laptop'}>}[Amount]*-1)

View solution in original post

3 Replies
sunny_talwar

May be this:

Sum({$<[PCC] ={"$(=concat([MCC],'","'))"},[RCPT] = {'Bottle', 'Laptop'}>}[Amount]*-1)

tresesco
MVP
MVP

Try:

sum({$<[PCC] ={"$(=concat([MCC],'","'))"},[RCPT] ={'Bottle' , 'laptop'}>}[Amount]*-1)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Don't be mistaken. The equal sign in a set modifier is an assignment operator, NOT a comparison operator. The values between curly braces get assigned to the field on the left as a sort of temporary selection. They do not compare to anything.

And just as with listbox selections, you select value1 or value2 or valueN in field RCPT...

Peter