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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
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 )