A line chart is useful to show trends over time, however, it may clutter the chart when there are multiple lines to represent categories. A set can be used to highlight only selected lines and gray out lines that are unselected by the user. I will be using a dataset on drug prices to illustrate this.

2.    Below are the steps:

2.1  Create a set for the category, e.g. country. Select a few countries.

2.2  Right click on the set created and ‘Show Set.

2.3  On the marks panels, add set dimension into ‘color’. In addition, add the category to ‘color’. Ensure that the color palette are set to different colors for those that are in the set. Colors for countries that are out of the set would be set to gray.

2.4  The final line chart will look as shown below. Select multiple countries on the filter panel. The selected countries are highlighted in color, while the unselected ones would be grayed out.

3.        Thanks for reading my post. You can also view the Tableau dashboard posted here.

Shaida Shamuri
Author: Shaida Shamuri