Some times it’s helpful to quickly visualize how you are performing year over year when you factor in seasonal variations in your data. This article describes how to build a line chart to compare year over year data.
In this example, we have the documents that were signed on a specific date. We are interested in summarizing the total number of documents by month, but highlighting year over year trends. We will analyze the Count of Documents.Id by Date Uploaded.
Starting in the Chart Builder, we will select our data source from the left side panel, and open the Table that contains our document details. We will drag our Documents Id column to Measures, and click it to open its settings. We’ll select Count of unique for the aggregation. This will give us a sum of the total number of unique documents.
Next, we will bring the Date Uploaded to dimensions, and select Month of Year from the Periodic section of the Time bucket dropdown. Note this will be a different aggregation than selecting “Month of Date Uploaded” from the Continuous section.
Here is where the magic happens. We’re going to drag Date Uploaded to Dimensions a second time, and this time we’ll select Year of Date Uploaded from the Time bucket dropdown. The combination of these two filters together will sum the documents updated by Calendar Year and by Month. Omitting the Year Dimension would result in a total of all documents uploaded for a given month, say January, regardless of the year.
Once completed, we will run the query to get our preliminary results.
Lastly, we’ll add a Data Pipeline pivot data step to summarize the document counts by month for each year. This will allow us to view our data as a line chart where each line will represent a calendar year.
Change your chart to a line chart, and you’ll see a year over year comparison of your data.