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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to write this set analysis?

Hi All,

I have the following table:

CustomerId Code

1, EN

1, GE

2, EN

I want to get how many Customers have both EN Code and GE code.

It is clear that just Customer 1. How to use count function to get it?

Many thanks.

1 Reply
jvitantonio
Specialist III
Specialist III

Try something like this:

=count (distinct {$<CustomerID = P ({1<Code={"EN"}>} CustomerID ) >*<CustomerID = P ({1<Code={"GE"}>} CustomerID ) > } CustomerID )