Practical examples
Having looked at some of the foundational concepts of table calculations, let's consider some practical examples. We'll start with some simple ones and move toward complexity.
Year – over – Year growth
Often, businesses want to compare year over year values, meaning they want to see how quarters (or months or weeks) in one year compared with the same quarters (or months or weeks) in the previous year.
Tableau exposes Year over Year Growth as one option in the Quick Table Calculations. Here, for example, is a view that demonstrates Sales by Quarter along with the percent difference in sales for a quarter compared with the same quarter in the previous year, as shown:
The second Sum(Sales) field has had the Year over Year Growth quick table calculation applied (and the mark type changed to bar). You'll notice the >4 nulls indicator in the lower-right corner alerting you to the fact that there are at least four null values (which makes sense as there is no 2012 to compare...