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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
divya_anand
Creator III
Creator III

set analysis - 2 different conditions

Hi,

I am trying to get the count of complaints

condition 1: if the supplier family of the complaint is 'ABC', then there are no extra criteria, it should just consider that complaint

condition 2: if the supplier family of the complaint is not 'ABC', then it should check another condition Portal_Status-={0}.

Below is the expression I am using in the chart:

Count({<Supplier_Family={'ABC'} >
+
<
Supplier_Family-={'ABC'}, Portal_Status-={0}, Company_Name-={'Test Supplier','Test Supplier','Test Company'} >}DISTINCT Complaint_Number)

Now the issue with this expression is this-

1. Without any selections, it is correct.

2. When I select a Supplier_Family, for eg. KGR, what I need to see is 0 (according to my 2 conditions mentioned above), but it shows the values for "ABC".

I understand it is showing correctly based on the expression, but could someone help me in modifying the expression to show the results I want?

Thank you.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You probably need the intersection operator * in your first field modifier:

Count({<Supplier_Family *= 'ABC'} >

+

<Supplier_Family-={'ABC'}, Portal_Status-={0}, Company_Name-={'Test Supplier','Test company','Test Company'} >}DISTINCT Complaint_Number)

View solution in original post

4 Replies
swuehl
MVP
MVP

You probably need the intersection operator * in your first field modifier:

Count({<Supplier_Family *= 'ABC'} >

+

<Supplier_Family-={'ABC'}, Portal_Status-={0}, Company_Name-={'Test Supplier','Test company','Test Company'} >}DISTINCT Complaint_Number)

divya_anand
Creator III
Creator III
Author

Hi Stefan,

Thank you for the response, while I check the data with the new expression, could you please tell me what does the intersection operator do here?

swuehl
MVP
MVP

Have a look at

Implicit Set Operators

divya_anand
Creator III
Creator III
Author

It works! thank you very much.