Blue and Green
The minute you start to drag and drop fields on to a view in Tableau, you will likely notice that some fields are blue and some are green. The fashion conscious among you might have heard the saying ‘Blue and green should never be seen, without a colour in between’. To be fair, there is usually either grey or white space in between the fields in a workbook, so if this was an outfit, Tableau would not be committing any faux pas. I’m not privvy to the reasoning behind why these colours were chosen. However what’s important is that we understand what the colours are telling us, and the impact of this. From my own personal journey learning Tableau and from my experience as trainer, I’ve found that this topic can be initially quite challenging. What I’d like to do with this blog is demystify it for anyone starting out. I’m obviously reading too many rhyming picture books to my kids which has produced the rhyming lines below, but I’m sharing in case it helps even one person grasp the concept more quickly!
You’ll notice on the data pane and also in the view
As you drag and drop your fields, some are green and some are blue
So what does tableau do, when you have a field that’s blue?
It shows discrete headers, there are sometimes quite a few.
And what can be seen, when a field is coloured green?
You get one continuous axis that can stretch across the screen.
So blue indicates that a field is discrete and green means that a field is continuous. Let’s refer to the dictionary definitions of these words before we go any further. According to Collins online dictionary “discrete ideas or things are separate and distinct from each other.” Looking at a word in context can help, so let’s look at this example in a post from enhancemywriting.com: “The book is unusual in that it is separated into several discrete parts, which are totally unconnected”. On the other hand, if something is continuous it is ‘forming an unbroken whole; without interruption” (Lexico powered by Oxford). The following example is given: ‘the whole performance is enacted in one continuous movement’.
Armed with these definitions and examples we should have a better idea of the meanings associated with the words. When Tableau is treating a field as discrete, it thus assigns separate headers or labels to the different values e.g. different countries in a dataset. Whereas if it is treating something as continuous, it provides one axis which gives the sense that the values are connected in some way and shows them relative to each other e.g. sales values. Watch what happens when we drag and drop these two fields below:
Given that the colour coding is somewhat arbitrary (at least to my knowledge), you must simply learn which is which. If this isn’t coming easily to you, you can learn the rhyme above, or you could try thinking about it like this. Blue can often be thought of as a cold colour, so you can think of these cold, discrete headers that want to stay separate from one another. Green is a colour that can stand for growth, so this could represent the ongoing or everlasting nature of something that is continuous. This might be a stretch for some and maybe you’d simply rather learn which is which and move on from there! Once this idea has bedded down, the behaviour of the tool will become much clearer and it will allow you to gain more control over your views. You can practice dragging and dropping different fields and creating various views until the concept of blue = discrete and green = continuous becomes internalised. Soon it should become as natural to you as knowing the difference between your left and right (side note, did anyone else have to use the trick of making an L shape with your left hand until you knew which was which?!).
Changing from continuous to discrete (and vice versa)
While Tableau makes a choice whether to show your fields as discrete or continuous starting off, in a lot of cases you can change this by clicking on the field in the view or the data pane and navigating to either ‘discrete’ or ‘continuous’. See below what happens when we change Sales from being continuous to discrete. Instead of displaying the sales for each country shown along the axis, we now get individual distinct headers for each country’s sum of sales.
Some fields, by their very nature, can only be visualised in a discrete way. If this is case you don’t get an option to change. Take for example a field that contains the marital status of employees in a company. Values you might expect here would be Single, Married, Separated, Divorced. These are going to displayed as separate headers in a list as it wouldn’t really make sense to have an axis of these distinct states.
Similar to numeric values, dates can be displayed either discretely (the default) or continuously. When dates fields are discrete then the discrete date parts or chunks of time can be moved around independently of one another. We can play around with the hierarchies and separate the date parts between rows and columns if we wish. On the other hand, if we choose to view dates as being continuous, we get date values plotted on a continuous axis. In this way times and dates are being viewed chronologically. Our next blog is going to focus more on this area so we will leave it at that for now.
Dimensions versus Measures
Upon connecting to your data source, Tableau will split your fields up into dimensions (fields for slicing and dicing your data) and measures (numeric values that will be aggregated automatically when you drag to your view, unless you have changed the default setting). Tableau doesn’t always get this division between the Dimensions and Measures correct, and you can simply drag and drop your fields from the measures pane to the dimensions pane and vice versa if you want to reassign. You might notice in the data pane that dimensions are discrete as a default and thus blue and measures are green i.e. continuous by default. While this is presented as the default because it is often the way you will chose to visualise your fields, this can be changed as noted already above.
I hope you have found this article helpful and please feel free to leave a comment below!