Tutorial
This tutorial is part of a series of tutorials on period over period analysis in Tableau. You can find the previous tutorial here: Period over period comparison cards in Tableau
When dealing with period over period comparisons in Tableau, it is often useful to display the periods involved to the user. This is typically easily done with grey bands on a line chart to show the periods involved. In this tutorial, we will see how to build such a chart (part B of the following dashboard).
Here we will assume you followed Part A of this tutorial series and have 2 parameters [p. From] and [p. To] as fo to define the reference period and a parameter to define the comparison period [p. Compare With].
We will also assume you have created the associated calculations [c. Last From] and [c. Last To] which are the extremum dates of the comparison period.
Drag your date field to the columns shelf and your KPI to the rows shelf. You should get a line chart with a trend over time.
Since we want to display bands for each extremum dates, we will need to add the date fields ([c. Last From] and [c. Last To]) to the detail shelf.
Here how it should go :
Now go to the Analytics section to the top left of the screen and drag a Reference Band to the view (on the date field in our case [Order Date]).
Here is how it should go :
And that's all there is to it ! If you found this tutorial interesting, here is the 3rd part of the tutorial series on period over period analysis in Tableau : Period over period comparison Bubble Chart in Tableau