## Blue things and Green things

Why are some things in Tableau desktop BLUE and other things GREEN?

Understanding the difference between the blue and green items in Tableau is (IMHO) the single most important piece of understanding necessary to make Tableau function well.

It it so fundamental, that I can honestly say that until I understood this, I was pretty much guessing how Tableau would react to my actions.

### What am I talking about?

Take a look at the image below.  Marked by the blue and green arrows, you can see a number of blue pills on various shelves (such as the row shelf and the colour shelf), and you can see a number of green pills elsewhere.

You should also able to see that the icons in the data window are either blue or green.

### Doesn’t the blue/green colour indicate a measure or dimension?

No.  That conclusion is easily reached as most dimensions are blue and most measures are green, but it is not correct.

The colour is used to indicate which fields are discrete and which are continuous

Blue fields are discrete and green fields are continuous.

 Blue fields are discrete – they contain a FINITE number of values – for example – the field REGION may contain the values North/South/East & West, but no others Green fields are continuous – they could contain an infinite number of values – for example the PRICE of an item could be any value along a number line.

Note that there are many grey areas in the distinction between discrete and continuous.  In the example given above – the possible PRICE of an item does not actually result in an infinite set of possible values.  It is however theoretically possible for an item to be priced at any value, so we would expect this value to be considered as a continuous variable.

### Why this is so important to Tableau?

Discrete and continuous fields are treated in very different ways when used to create a Tableau view.  Understanding how Tableau behaves when these different field types are used is fundamental to understanding how to use Tableau.

The effect of using these different field types is most obvious when adding a field to the following shelves:

Rows and Columns – for controlling the layout of your visualisation

Filters – for restricting the data being displayed

Colour – for determining the visual presentation of data

### Using Blue/Green fields on Rows/Columns

When you add a BLUE field to either the row or column shelf, Tableau responds by displaying a TABLEAU HEADER (don’t get confused with the terminology used to describe column headers in Excel for example – these are a little different – hence ‘Tableau Header’).

The ‘Tableau Header’ is highlighted below using a blue box.

In the following view, there are THREE blue fields on the row and column shelves.

This causes Tableau to respond by drawing THREE Tableau headers – one across columns, and two across rows.

When you add a GREEN field to rows or columns, Tableau responds very differently – an AXIS will be drawn.  Or more correctly, one axis per row/column (or just one axis is there are no headers in the view)

In the first image – a single green field is placed on rows – this results in a single VERTICAL axis as there are no other headers in play.

In the second view – there are multiple axis created – as Tableau is creating one axis per row/column – the ‘Region’ field is creating a Tableau header which is causing 4 rows to be displayed.  The result is 4 rows, each of which has it’s own axis.

In the following view, three green fields are placed on the columns shelf – this results in Tableau drawing three axis – one each for sales, profit and discount.

Armed with this information – we can now start to interpret how to draw almost any view with Tableau.

For example – a scatter plot is typically a view which has two axis, one vertical and one horizontal.  Using what we know about green and blue fields, we know that a view requiring two axis must have a green pill on both rows and columns.  The only thing left to decide is which fields we are interested in – Sales and Profit for example (note I have also placed another blue field on the ‘Level of Detail’ shelf)

Now lets consider a table of data – we know a data table does NOT have an AXIS – therefore we can assume that only BLUE fields should be placed on rows or columns to create a table, as shown here – NOTE that the green field is placed on the text shelf, rather than on rows or columns (as we do not want to create an axis).

### Using Blue/Green fields on Filters

Placing a blue field on the filter shelf causes Tableau to respond by displaying a dialog box asking which ‘members’ of the discrete field should be included in the view.  The fact that the blue field is discrete means that Tableau simply needs to know which of the available values should be included.

More information is required if a green field is placed on the filter shelf.

Placing a green field on the filter shelf results in a different type of dialog box being displayed by Tableau.  Before Tableau can complete the filter, it needs to know whether you would like to filter based on an AGGREGATION of the data, or whether you would like to filter on the RAW data.

Choose ALL VALUES if you want to filter on the raw data.  This causes Tableau to compare your filter settings with the value (for sales in this case) which is held in each row of your data.  In this example, you could choose to filter out all sales where the dollar value was less than 5 dollars.

Choose an aggregation if you want to filter out ‘members’ of the dimension by which you aggregate the data.  For example, if you choose to aggregate by ‘State’ and you are filtering on SUM(Sales) then your filter settings may exclude states which have total sales of < \$500,000.

Once you have added this filter, you can display it as a QUICK FILTER (by right clicking the pill on the filter shelf) and then set the display format to a slider.

### Using Blue/Green fields on Colour

When you use the colour shelf – the response from Tableau varies depending on whether you place a blue field or a green field on the shelf.

Since blue fields represent a ‘discrete’ set of values, the response from Tableau is to choose a set of colours which are themselves discrete – and apply each of these colour to a member of the field placed on the shelf.

For example, placing ‘Region’ on colour when ‘States’ are displayed results in the following shading (I have also grouped states by region by placing Region on the row shelf).

It is now possible to edit the colours chosen by Tableau either by double clicking the legend entries or by using the drop down on the colour legend (top right corner).

However you start the process of editing colours, the dialog presented only allows you to choose colours from discrete sets.

When you place a continuous variable on the colour shelf, Tableau responds by adding a sequential colour to the members of the dimensions in play.  In this case, Tableau as defaulted to show a light to dark gradient of green

This can be edited by double clicking the colour legend, but this time a different dialog box is presented – one in which the colour palettes are all sequential, they are however of two types:

Standard Sequential – these colour palettes are composed of a single colour and provide a gradient from light to dark.

Diverging sequential – these colour palettes are based on two or three colours, Tableau provides a gradient between the colours as shown below:

If you’re interested in creating your own colour palettes, go here.

### In Summary

Using Tableau can initially be a strange experience to some people.  I believe this happens because views can be created so fast (see my earlier post) that it can sometimes feel like magic.

London, UK

### 44 thoughts on “Blue things and Green things”

1. Great post Tom!

Two more green/blue awareness items are:
– To get a trend line you need a continuous pill on both the Rows and Columns shelf (green on both). The exception is date pills can be blue, discrete, but treated as continuous, but only sometimes. 🙂
– If you perform an aggregation in a calculated field's formula, and the pill gets an AGG() wrapper, then you can only filter on it when it is a continuous measure (green pill).

2. Paul Sochan says:

Great explanation Tom!

3. Great explanation and introduction Tom! I'll definitely share this as I introduce people to Tableau.

4. I would estimate that 98% of Tableau users don't understand this Tom. Nice post.

5. Tom Brown says:

Don't understand my post, or don't understand the meaning of green/blue! Hopefully the latter!

1. Oleksiy says:

2. saranya says:

Awesome Explanation Tom!!!

6. Terrific post. Just discovered this website, and can’t wait to delve into it. I agree that there are so many “basics” that not clearly understood by lots of folks. And without the basics, all else seems arcane and sometimes capricious. Keep up th good work.

7. I am a newbie in Tablea, and I must say that this post really help me demystify some stuff! Thanks Tom!

8. Neil says:

Thanks Tom – This post must be made the first step on the path to Tableau nirvana!

9. Kamal says:

Nicely explained, a great Tableau 101 post. Thanks !

10. Outstanding post. I agree most Tableau users do not have a grasp of this core concept.

11. Great post – it is always worth your while spending the time understanding the fundamentals before plunging in. But seldom easy to communicate or teach them in such a digestable form. Thanks for sharing!

12. Andy McNair says:

Great article which has really helped my understanding of how Tableau is working on my data!

13. Colin Hodges says:

Thanks for the post, helps me on my path.

14. Mark Bologna says:

Thanks Tom! I’ve been using Tableau for years, but this is the best explanation I’ve come across.

15. HHi Tom, thanks for the article, feels like you read my mind with this one… I was starting to struggle until I read this. good work!

16. Sai says:

Nice explanation about Discrete and Continuous Fields

17. Abhijeet says:

Thanks Tom. Great article for beginners.

18. Shanil says:

Wow. Excellent artcile Tom. I have been playing with Tableau for few days now. But I was always wondering how Tableau functions when you drag and drop the fields to the visualization. This is a great post which clearly explains why Tableau behave the way it is. It is not magic after all. Armed with a clear understanding of the discrete and continous measure I am now ready to step up my skill in Tableau. Without this amazing post I will be still lost.

Thank You so much Tom.

19. Karthik M says:

Very useful post for beginers. Thank you 🙂

20. kishor says:

Tom
Awesome Article,I questioned many people why this is continuous or discrete.
This explains me. Thankful to you :).

21. Pawan Daga says:

Thank you for writing such a simple yet extensive article.The way the concept of discrete and continuous have been catered is very helpful and cleared a lot of If’s , but and why’s for me.

22. pavan says:

We can convert continuous field as discrete and discrete as continuous what happens when we do it.
can u explain me that?

23. Kelly P says:

4+ years later and this is still a fantastic and relevant topic for Tableau newbies like me!
Thanks for the clear explanation, it has helped alot!

24. Awesome post Helped me broaden my understanding of the tool

25. Gautam Mishra says:

Great job friend.. helped me a lot

26. Natalie says:

Very useful, thanks!

27. Archana Rajan says:

Amazing Post Tom, Has been a great help in understanding Tableau basics . I’ve not read such a brilliant description anywhere.

28. jgmejia says:

Superb! Thanks

29. Lance Martens says:

Appreciate the insight provided Tom, key to building any knowledge framework is a foundation based on understanding why a system responds in the way that it does. Without campaigners such as yourself, many of us would just pursue the old “Drag-Drop-Hope for the Best” I’m locked in as a follower mate, Thanx!

30. Arun Mathew says:

Thanks Tom. This does clear a lot of the confusion around how data is being handled and displayed in Tableau

31. Krishna says:

Appreciate effort to put this together. Thanks