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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
flemmingbj
Contributor III
Contributor III

Count number of times IDs have a count > X

Hi

I have a dataset with IDs. I want to count how many times different IDs appear more than X times. That is "how many times do we have IDs with more than X occurances")

I found this code, but it gives way too big counts

Count(Distinct
Aggr(
If(Count(TOTAL distinct PID) > 10, PID),
PID
)
)

Labels (1)
1 Solution

Accepted Solutions
Antoine04
Partner - Creator III
Partner - Creator III

Hello,

Try something like :

Sum(Aggr(if(count(ID) > X,1,0), ID))

Let me know if it works.

Regards

View solution in original post

2 Replies
Antoine04
Partner - Creator III
Partner - Creator III

Hello,

Try something like :

Sum(Aggr(if(count(ID) > X,1,0), ID))

Let me know if it works.

Regards

flemmingbj
Contributor III
Contributor III
Author

Thank you!! It works... I had to add year in the code to make it per year too (wasn't part of my question), but that worked too!