---
title: "Ask A Data Scientist: How Does Clustering in Tableau 10 Work?"
description: One of the coolest features in Tableau 10 is clustering. But how exactly does clustering work in the update? Let's Ask A Data Scientist!
---

[Data Blog & Analytics | Arkatechture ](https://www.arkatechture.com/blog)

# [Ask A Data Scientist: How Does Clustering in Tableau 10 Work?](https://www.arkatechture.com/blog/ask-a-data-scientist-how-does-clustering-in-tableau-10-work)

 Written by [Pat Lapomarda](https://www.arkatechture.com/blog/author/pat-lapomarda) | September 22, 2016

[Katie Paige](https://www.arkatechture.com/blog/author/katie-paige) recently listed the [10 Things We Like About Tableau 10](https://www.arkatechture.com/blog/10-things-we-like-about-tableau-10) here at Arkatechture. I've been a fan of how Tableau is really the "easy-button" for BI for many years and was really excited when I read about **#5: Clustering**!

I did some digging to see how it was implemented and learned that Tableau uses K-Means and optimizes the hardest part of using K-Means by using the Calinski-Harabasz Index to recommend the value of k. At its core, K-Means clustering finds the best method to split a population into k different groups on the basis of their features. 

[Katie](https://www.arkatechture.com/blog/author/katie-paige) recommended a [Tableau blog post](https://www.tableau.com/about/blog/2016/8/adventures-clustering-58014) by Tableau Zen Master Andy Cotgreave and it's a great primer on how & why to use clustering in Tableau. My research started with Tableau's [product documentation](http://onlinehelp.tableau.com/v10.0/pro/desktop/en-us/help.html#clustering.html). As expected, Tableau does a great job identifying the constraints they've applied in their implementation:

 

> *Clustering is not available when any of the following conditions apply:*
> 
> - *When you are using a cube (multidimensional) data source.*
> - *When there is a blended dimension in the view.*
> - *When there are no fields that can be used as variables (inputs) for clustering in the view.*
> - *When there are no dimensions present in an aggregated view.*
> 
> * *
> 
> *When any of those conditions apply, you will not be able to drag Clusters from the Analytics pane to the view.*
> 
> * *
> 
> *In addition, the following field types cannot be used as variables (inputs) for clustering:*
> 
> - *Table calculations*
> - *Blended calculations*
> - *Ad-hoc calculations*
> - *Generated latitude/longitude values*
> - *Groups*
> - *Sets*
> - *Bins*
> - *Parameters*
> - *Dates*
> - *Measure Names/Measure Values*

 

After a little thought, these all make sense, but I could see myself trying several times to use a binned measure in clustering, since that's what I'd do in R or SAS (I do find Tableau's binning feature the only real dissatisfying feature). From this documentation, you can dig into [How Clustering Works in Tableau](http://onlinehelp.tableau.com/v10.0/pro/desktop/en-us/help.html#clustering_howitworks.html) and find [Determining the optimal number of clusters](http://onlinehelp.tableau.com/v10.0/pro/desktop/en-us/clustering_howitworks.html#Determining_the_Optimal_Number_of_Clusters) with the Calinski-Harabasz criterion:

 

Where SSB is the overall between-cluster variance, SSW the overall within-cluster variance, k the number of clusters, and N the number of observations

The math behind this is solid, since it's built on the proportional variance between & within clusters and the proportional dimensionality of the clustering. I found this great explanation of the index on [StackExchange](http://stats.stackexchange.com/questions/97429/intuition-behind-the-calinski-harabasz-index).  

By recommending k, Tableau has made the hardest part of clustering easy, just like they've been doing for vizzing for years. **It's no wonder why we love Tableau here at Arkatechture.**

[View full post](https://www.arkatechture.com/blog/ask-a-data-scientist-how-does-clustering-in-tableau-10-work)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Pat Lapomarda"
  },
  "dateModified" : "2017-03-03T20:49:18.690Z",
  "datePublished" : "2016-09-22T16:30:00Z",
  "headline" : "Ask A Data Scientist: How Does Clustering in Tableau 10 Work?",
  "image" : {
    "@type" : "ImageObject",
    "height" : 800,
    "url" : "http://www.arkatechture.com/hubfs/Blog_Images/how_does_clustering_in_tableau_10_work.png",
    "width" : 800
  },
  "mainEntityOfPage" : "https://www.arkatechture.com/blog/ask-a-data-scientist-how-does-clustering-in-tableau-10-work",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://www.arkatechture.com/hubfs/ArkaLogo_Large.png",
      "width" : 377.70493
    },
    "name" : "Arkatechture Blog"
  }
}
```