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: 
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
MVP
MVP

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

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

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.

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
MVP
MVP

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

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

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
PaReD_SF85
Contributor III
Contributor III
Author

Thank you QFabian!  This works perfectly.