Becoming a Tableau Desktop Specialist – Part 4: Discrete vs. Continuous & Aggregated vs. Dis-aggregated
Sep 24, 2019Christine Rietmann
Hey everyone! This is part 4 of my ‘Becoming a Tableau Desktop Specialist’ blog series. Last week’s post was about dimensions and measures and today I will write again about fundamental ‘Tableau Concepts’: Discrete/Continuous & Aggregated/Disaggregated.
Check out the further posts of this series to learn more about it:
First of all, I want to clear up the misunderstanding that the green pills indicate measures and the blue ones dimensions. The fact is that the green pills indicate continuous variables and the blue pills discrete variables. The confusion is caused by the default setting of Tableau that a measure is categorized as continuous and a dimension as discrete. But you can convert every discrete (numerical) dimension into a continuous dimension and every measure into a discrete measure.
So, we now know the correct meaning of the colors and furthermore that the pill of a measure can be green and blue which means a measure can be continuous and discrete. The same applies to numerical dimensions.
The most impressive example is the date variable. If you set your date as discrete, you create headers, which can be sorted. If you shift to continuous, you create an axis that sorts the dates chronologically. (Notice the color of the pills in this example!)
Referring to last week, MONTH(Order Date) is the dimension in the view, the independent variable. In the first chart we have a discrete dimension, the sum of profit is computed for each month over all years. The second chart calculates the sum of profit for each month in each year for a continuous dimension. If you click the header at the bottom of the first chart, you can just format the headers. In the second chart, you can format and edit the axis.
Regarding the difference between discrete and continuous I really liked this explanation on the Tableau website:
“Continuous means forming an unbroken whole, without interruption; discrete means individually separate.”
I hope you got a good insight about ‘discrete vs. continuous’, so we can now continue with ‘aggregated vs. dis-aggregated‘.
The exam’s guide wants us to know why Tableau aggregates measures. Good question. A lot of websites explain that Tableau does aggregate measures by default but they don’t mention why. Luckily I found a discussion in the Tableau Community Forum.
Let me summarize the answers from the thread for you. One argument is that measures in most cases are more meaningful when they are an aggregate. Lei Chen illustrates this with the following example:
What’s the difference between these two charts? In the first chart we have the sum of sales and only one mark in the view:
For the second chart, I have unchecked ‘Aggregate Measures’ under ‘Analysis’…
…and get one mark for every record in my data source.
Another answer was given by Mahfooj Khan. He explained that measures will be aggregates because they are dependent variables. This links to what we learned last week about measures and dimensions. For most cases the dimension is the independent variable and determines the level of detail of the viz. This also means that it sets the level of aggregation.
In our first example we had just the sales, if we now bring ‘Segment’ to the view for instance, we will get three bars or three marks, one for each member of the dimension ‘Segment’:
In other words: more dimensions create more granularity and cause less aggregation. See again our example after bringing in Category and Sub-Category. We now have 51 marks in the view. (The number of marks in the view is calculated with the size()-function; you can also see this information on the left bottom of your view.)
As mentioned earlier measures are aggregated by default. The default aggregation function is in most cases the sum-function, but of course there are also other possible aggregations. Remember part 2 of this series where I talked about managing data properties. This is the place where you can also define the default aggregation function for each measure.
Moreover, it is possible to aggregate dimensions (remember last week!!). You can choose between Min, Max, Count, and Count (Distinct). In the following example I’m counting the distinct number of customers for each segment, category, and sub-category.
To sum up: you should now know that there are a lot of possible combinations for your data fields. Your measures can be …
The same applies for dimensions, they can also be…
Make sure you know which combination to use when bringing your data fields into your viz.
This week’s and last week’s fundamental Tableau concepts are really important. I’ve read a lot about it but for me everything clicked into place after watching the free training video from the Tableau website, where they pointed out that…
“The way Tableau calculates depends on the aggregation of the data – therefore it depends on the granularity of the view.”
I will keep this in mind and never forget 🙂
Feel free to use the comments for feedback or reach out to me on twitter! See you again next week.