Chapter 52. 3 Innovative Ways to Use Dates: Tip 1
How to Equalize Dates Using the MAKEDATE Function
Comparisons and viewing trends across dates are two effective ways to turn raw data into insights, but dates can be tricky to work with in Tableau. In Chapter 26, I illustrate how to find hidden patterns in line graphs by adding a slope graph toggle, but what if the dates are not lined up on the same axis? For example, if you were to make a Sales by continuous Order Date line graph with Tableau’s Sample – Superstore dataset and color the marks by year, you would get four colored lines that do no not line up on top of one another.
Tableau does not have a Month + Day date part, which can make it challenging to compare year-over-year performance. This chapter shows you a basic way to normalize months and days so that they share the same axis when colored by year. When the marks line up, it is much easier to evaluate year-over-year performance.
The Challenge of Not Having a Month + Day Date Part in Tableau
First, let’s have a look at why this tip is needed. Here is an illustration of the sales by continuous order date line graph:

As you can see, although all four years are represented on the line graph, it is difficult to compare the same time period year over year. For example, it is almost impossible to determine whether the peaks in each year line up on or around the same dates. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access