Why are they blue or green?

by Débora Contente

One of the first things you may notice when you start playing around with Tableau is how there are pills that are green and pills that are blue (they may eventually be red – in that situation the colour is quite explicit – you’ve messed up somewhere, or grey – when you add it to context).
Have you wondered why that is? In this blog post, I will satisfy your curiosity .

What are blue/green pills?

Fig.1 – Green pill on top and Blue pill in the bottom

First things first, it’s important to start by showing what I am actually writing about. In figure 1 you can see who are the famous blue and green pills – they are basically the headers of the columns, the fields of our datasets and once they are inserted in Tableau, they are assigned a colour – either green or blue.

What’s the reason for them being either green or blue? A wrong guess.

Your first guess may be that that has to do with it being a Measure or a Dimension, as most of the times blue pills happen to be a Dimension as well as most of the times green pills happen to be a Measure (Figure 2 below).

Figure 2 – Measures and Dimensions usual colours

What if I told you that you can have Measures that are blue, and Dimensions that are green? Don’t believe me? Just spot the differences you would not expect in the figure 3 below:

Figure 3 – Blue Measure and Green Dimension

This happens because that is not the real criteria that Tableau follows for its colour assignment.

What’s the reason for them being either green or blue? The truth.

Truth is it is something less obvious that Dimension/Measure. It has to do with the values being Continuous or Discrete. And what does that mean? – you ask.

Continuous Values

Continuous values are those that have a continuous scale with an infinite number of values to be assumed. Take this example: The number of sales can range on a continuous scale and assume an infinite number of values.

Discrete Values

Discrete Values are those that cannot have a continuous scale and assume a finite number of values. Take this example: The name of customers will not range on a continuous scale of names, it is restricted to each individual name.

Now you know the secret: Blue pills are discrete and Green pills are continuous.