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

Count unique value of a field but exclude specific value from the count

I need to count the number of customers with unique values in one field while excluding a specific value at the same time.  I feel I am close but being new, I am missing something likely very simple.

Using the sample data,  I want to exclude '333' from the count of unique IDs per Customer.

Sample:

CustomerID
a666
a666
a333
b111
b222
c111
c111
c222
c333
  
Summary Counts I need:
a1
b2
c2

 

Thank you for your help!

Labels (1)
2 Solutions

Accepted Solutions
QFabian
Specialist III
Specialist III

Hi @PaReD_SF85 , try this expression it uses some set analysis :

count({<ID -= {333} >} distinct ID)

 

QFabian

View solution in original post

PaReD_SF85
Contributor III
Contributor III
Author

Thank you QFabian!  This works perfectly.

View solution in original post

2 Replies
QFabian
Specialist III
Specialist III

Hi @PaReD_SF85 , try this expression it uses some set analysis :

count({<ID -= {333} >} distinct ID)

 

QFabian
PaReD_SF85
Contributor III
Contributor III
Author

Thank you QFabian!  This works perfectly.