Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

roisolberg
New Contributor III

Set analysis - excluding the intersection

Hi All,

 

i am trying to filter out some troublesome lines,

i want to sum a field 'LineCount' but to exclude if the  ActionType='Close' and the LineStatus='1' 

So basicly i want to sum the red part in the drawing below:

Intersection.jpg

what is the correct syntax for using set analysis in this case? 

 

Thanks,

Roi

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions

Re: Set analysis - excluding the intersection

Hi, can you try this?
sum({<LineStatus-={1}>+<ActionType-={'Close'}>} LineCount)
5 Replies
Partner
Partner

Re: Set analysis - excluding the intersection

Woul it be possible to share some sample data, 5 lines of data maybe? with the expected output and result?

You'll ALWAYS get much more responses from the community if you're willing to share sample data or construct an inline table..

 

 

try : 

1) Sum({<LineStatus={1},ActionType={'Open'}>+<ActionType={'Close'},LineStatus={0}>}Value)

or

2) Sum({<LineStatus={1}>/<ActionType={'Close'}>}Value)

Result:

Capture.PNG

Somasundaram
Contributor III

Re: Set analysis - excluding the intersection

you can try this,

 

=sum({$<ActionType={'Close'}>/<LineStatus={1}>}LineCount)

 

 

 


-Somasundaram

Re: Set analysis - excluding the intersection

Hi, can you try this?
sum({<LineStatus-={1}>+<ActionType-={'Close'}>} LineCount)

Re: Set analysis - excluding the intersection

You can also try this

Sum({
<LineStatus = {'1'}>
+
<ActionType = {'Close'}>
-
<LineStatus = {'1'}, ActionType = {'Close'}>
} Measure)
Highlighted
roisolberg
New Contributor III

Re: Set analysis - excluding the intersection

Thank you all for your effort and assistance!