Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.


4 Replies
sunny_talwar

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

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)