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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
PamelaAlcantara
Contributor II
Contributor II

Set Analysis with a Sum IF statement

Hi All, 

I have a requirement to realize a Sum for some items that got a result "Passed"

So I created the following expression:

sum(IF(RESULT='Passed',1,0))

But I do also have to set an analysis based in Variable1  and Variable2.

So, I need to add the following expressions:

Variable1 ='Yes'

Variable2 contains 'Success'

ItemResultVariable1Variable2
1PassedYesSuccess type 1
2FailedYesObservation
3FailedYesObservation
4PassedYesSuccess type 2
5PassedYesObservation
6PassedYesSuccess type 1
7PassedNoObservation
8PassedNoSuccess type 1
9PassedYesObservation
10FailedNoObservation
11FailedNoObservation
12PassedYesSuccess type 2

 

How can I add the set analysis to the original expression?

1 Solution

Accepted Solutions
sunny_talwar

May be this

Count(DISTINCT {<RESULT = {'Passed'}, Variable1 = {'Yes'}, Variable2 = {"*Success*"}>} Item)

View solution in original post

1 Reply
sunny_talwar

May be this

Count(DISTINCT {<RESULT = {'Passed'}, Variable1 = {'Yes'}, Variable2 = {"*Success*"}>} Item)