Chapter 80. How to Highlight Data Points in a Custom Date Range
This tutorial illustrates how to add a highlighter to a custom date range selected by an end user. The highlighter lies over the data points corresponding with the selected range of dates. This technique helps you and your dashboardâs users to see the marks in the selected date range in context of the other marks on the view and is an easy way to enhance the design of a line graph. One of the best parts about the following approach is that it does not require you to use the dual axis, leaving some flexibility to add even more context or aesthetic improvements to the graph.
To highlight the data points in a custom date range, letâs use a combination of Tableau parameters and reference lines. Just as with Chapters 78 and 79, letâs create a sales by continuous month line graph using the Sample â Superstore dataset as our foundation:
Next, set up a parameter with a data type of Date. This first parameter will eventually be used to select the beginning of the highlighted range. Hereâs how it looks after setting it up and choosing 7/1/2023 as the date:
We also need to create a parameter that we can use to select the end of the highlighted date range. Because we already made a parameter with a data type of Date, ...
Get Innovative Tableau now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.