One of the most important things to understand when learning Tableau is the difference between blue and green fields. Understanding what these colours mean can make a huge difference to how you build visualisations and how Tableau responds to your actions.
When I first started using Tableau, I assumed that blue meant dimension and green meant measure, however this isn’t always the case!
So, what do the colours actually mean?
The blue and green colours indicate whether a field is discrete or continuous, rather than whether it’s a dimension or measure.
- Blue = Discrete: represents a finite number of separate values or categories. For example, a country field containing the UK, USA, Brazil and Mexico.
- Green = Continuous: represents an infinite range of values. For example, sales or profit.
This matters because Tableau treats discrete and continuous fields differently when building visualisations, which becomes noticeable when adding fields to the Rows, Columns, and Filters shelves.
Rows and Columns: Headers vs Axes
A noticeable difference is what happens when you drag a field onto rows or columns.
When you add a blue (discrete) field, Tableau creates headers. These separate your data into individual categories or groups. For example, adding country to rows would create a separate row for each country.
When you add a green (continuous) field, Tableau creates an axis instead. This gives you a continuous scale along which your data can be plotted. For example, adding sales to columns would create an axis showing the range of sales values.
This is useful when thinking about the type of visualisation you want to create. A scatter plot, for example, needs an X and Y axis, so you would typically use two green fields, one on rows and one on columns. However, if you wanted to create a data table, you would use blue fields on Rows and Columns to create headers rather than axes.
Filters: Selecting Values vs Ranges
Blue and green fields also behave differently when used as filters.
- Blue filters (discrete): Allow you to select which individual values you want to include or exclude. For example, selecting only the North and South regions.
- Green filters (continuous): Allow you to filter using a range of values. For example, displaying sales between £100 and £500.
Colour: Categories vs Gradients
The Colour shelf is another place where the difference becomes clear.
- Blue fields: Assign a different colour to each individual category. For example, adding region to colour would give each region its own colour.
- Green fields: Create a continuous colour gradient. For example, adding sales to colour could create a light-to-dark gradient, with lighter shades representing lower sales and darker shades representing higher sales.
What should you remember?
The key takeaway is that blue and green represent discrete and continuous fields, not necessarily dimensions and measures.
Although dimensions are usually blue and measures are usually green, this isn't always the case. You can change a field from discrete to continuous (or vice versa), depending on how you want Tableau to display your data.
