Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tahirkhalil
Creator
Creator

AND in Set Analysis

HI All,

How can I implement AND within SET.

I have an example - one ticket contain multiple activities and have responses against each.

For me a valid ticket is only one which have Activity A3 and A4 both with response 1.

I know if I use =count(DISTINCT {<Activity={"A3","A4"}, Response={1}>} Ticket) - it is working as OR. I want to use condition:

(Activity = A3 AND Activity = A4) AND Response=1

How to achieve that through set analysis? See attached document.

 

Regards,

 

Tahir

 

Labels (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

=count(DISTINCT {<Ticket=p({<Activity={'A3'}, Response={1}>})
*
p({<Activity={'A4'}, Response={1}>})>} Ticket)

View solution in original post

4 Replies
Thiago_Justen_

Your set is ok. Try it without the distinct...I guess you have the same ticket for both activities and response. Then you got only 1 as result because of the distinct.
Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
tresesco
MVP
MVP

Try like:

=count(DISTINCT {<Ticket=p({<Activity={'A3'}, Response={1}>})
*
p({<Activity={'A4'}, Response={1}>})>} Ticket)
tahirkhalil
Creator
Creator
Author

No the set is wrong - in fact it is working as OR I want this to be done as AND

robert99
Specialist III
Specialist III

Hi

I haven't a clue what you are trying to achieve to be honest

But would this work

count(DISTINCT {<Activity={"A3","A4"}>} Ticket)

+

count(DISTINCT {<Response={1}>} Ticket)