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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis for OR Condition

Hi

could any one help me how to use set analysis fot OR condition.

For Example,

Id      subid     amt

1          1          10

1          2          20

2          3          30

2          4          40

I can use sum(if(Id=1 or subid=3,amt))

how to use the above expression in set analysis.

thanks in advance.

6 Replies
Not applicable
Author

hi,

you can try it

=sum({$<Id={"1"}>} amt)+sum({$<subid={"3"}>} amt)

srinivasa1
Creator II
Creator II

Hi try this  one.

sum( {$<id= {1},subid={3} >} amt ).

enjoye..

IAMDV
Master II
Master II

Here is what you need to use...

sum({<Id={1}>+<subid={3}> amt)

"+" is the binary union set operator.

I hope this helps!

Cheers - DV

nstefaniuk
Creator III
Creator III

sum({ ($<Id={1}>+$<subid={3}>)}amt)

Not applicable
Author

hi,

I think your answer is more correct

IAMDV
Master II
Master II

Also I'm attaching a Set Analysis presentation for you reference. Please read the Set Operators topic in the presentation for full understanding.

Good luck!

Cheers - DV