Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set operation for multiple condition.

Hi.

I have to select data from following sample data.

code1  code2  val1  val2

a         b           11    22

a         c           33    44

a         d           55    66

1         2           77    88

1         3           99    100

1         4           10    20

the conditions are  (code1 is a  and code 2 is d)  or  (code1 is 1 and code2 is 3).

please show me the way to get the data above conditions.


Labels (1)
4 Replies
sunny_talwar
MVP
MVP

Try this:

{<code1 = {'a'}, code2 = {'d'}>}+{<code1 = {1}, code2 = {3}>}


{<code1 = {'a'}, code2 = {'d'}>+<code1 = {1}, code2 = {3}>}


Capture.PNG

jonathandienst
Partner - Champion III
Partner - Champion III

If you mean in a front end expression, then like this:

     {<code1 = {'a'}, code2 = {'d'}>+<code1 = {1}, code2 = {3}>}

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
avinashelite
MVP
MVP

you can also try with if condition as well

buzzy996
Master II
Master II

try with tis,

=sum({<code1={'a','1'},code2={'d','3'}>}val1)

=sum({<code1={'a','1'},code2={'d','3'}>}val2)