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

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

Retrieving count of common ids across all the months?

Hello Qlikers,

Suppose if I have 5 months in my datasource and there is an Id column. The ids may or maynot be repeated across months.

Suppose the ids associated with the first month are 35, second 27,third 32, fourth 40, and fifth 28. and suppose there are 12 ids whoch are repeated across all the months. How can I retrieve this 12 count and also these 12 ids?

Thanks in advance.

3 Replies
sunny_talwar

May be this:

Count

=Count(DISTINCT {<ID = {"=Count(ID) = Max(TOTAL Aggr(Count(ID), ID))"}>} ID)

List

=Concat(DISTINCT {<ID = {"=Count(ID) = Max(TOTAL Aggr(Count(ID), ID))"}>} ID, ', ')

Sample attached

maxgro
MVP
MVP

in a textbox (or dimensionless chart)  this is the list of id

concat(if(aggr(count(DISTINCT month),id)=5, id), '---')

and this the count

count(distinct if(aggr(count(DISTINCT month),id)=5, id))

sergiorey
Partner - Creator
Partner - Creator

Hi Patrik,

Here is my version:

Count of repeated IDs:

SUM(IF(Aggr(Count(Id), Id)>1, 1) )

List of repetead IDs:

Concat(IF(Aggr(Count(Id), Id)>1, Id & ' ') )