Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sai_12
Contributor III
Contributor III

and and or condition in set analysis

Hi everyone,

I have a requirement where

I want to only count clients where(case_Status is open) and (email_status=active or sms_Status=active or phone_Status=active)

so i am using this

count({<Email_status={'active'}>+<SMS_status={'active'}>+<Phone_Status={'active'}>},{<Case_Status='Open'>} distinct [client]))

But i am getting error, all i want is count for case_status=open and any of email_Status,sms_Status or phone_Status is active

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

In general such approach should work but there is a small syntax issue and it should look like:

count({<Email_status={'active'}>+<SMS_status={'active'}>+<Phone_Status={'active'}> * <Case_Status='Open'>} distinct [client]))

View solution in original post

3 Replies
Mark_Little
Luminary
Luminary

Hi,

Certainly not the best approach but should give you the correct answer.

count({<Email_status={'active'}, Case_Status='Open'>} distinct [client]) +

count({<SMS_status={'active'},Case_Status='Open'>} distinct [client]) +

count({<Phone_Status={'active'},Case_Status='Open'>} distinct [client])

marcus_sommer

In general such approach should work but there is a small syntax issue and it should look like:

count({<Email_status={'active'}>+<SMS_status={'active'}>+<Phone_Status={'active'}> * <Case_Status='Open'>} distinct [client]))

anat
Master
Master

count({(<Email_status={'active'}>+<SMS_status={'active'}>+<Phone_Status={'active'}>)*<Case_Status='Open'>} distinct [client]))