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

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

Counting Distinct values and separating into 3 columns

Hi-

I have a straight table that I am looking to show total counts of the # of documents associated with a certain type of "document type".

I tried using =if(DocType = 'DocTypeA', count(distinct(DocID))) for the first DocType expression, and substituted 'DocTypeB' and 'DocTypeC' for the other two expressions.

In some cases, it is working, but in cases that the 'Person' (my dimension) has multiple 'document types' , it will only show the first expression total. 

Is this a problem that set analysis can solve?

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

try count(distinct {$<[DocType]={"DocTypeA"}>} [DocID])

View solution in original post

3 Replies
giakoum
Partner - Master II
Partner - Master II

try count(distinct {$<[DocType]={"DocTypeA"}>} [DocID])

Not applicable
Author

Like a charm.  Thanks!

Not applicable
Author

Like a charm.  Thanks!