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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
linnakry
Partner - Contributor III
Partner - Contributor III

Count Number of Data Point in a Cluster

Hi all,

I would like to count total number of data point belong to a cluster. In table below, column 4 is using KMeanCluster2D to cluster ID into 5 cluster. I want to count the number of ID belong to a cluster in Column 5. 

Note: it should be a chart function. 

linnakry_0-1676626486618.png

I am trying to apply Silhouette Analysis to pick the K Value (although in my example, K value is already chosen). 

https://help.qlik.com/en-US/sense/November2022/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Ranki...

Labels (2)
2 Replies
brunobertels
Master
Master

may be this ? 

=count(aggr(KMeans2D(vDistClusters,only(latitude),only(longitude)), nodistinct id))

 

=count( nodistinct aggr(KMeans2D(vDistClusters,only(latitude),only(longitude)), total id))

linnakry
Partner - Contributor III
Partner - Contributor III
Author

@brunobertels unfortunately it doesn't work.