For a Football dashboard I recently made, I wanted to highlight my line graph by using a parameter. This blog contains a step by step explanation of how to build this in Tableau.
The easiest way to highlight different parts of your graph is to use the Highlighter function. When you right click on a dimension and select Show Highlighter, you can use this dimension as a highlighter:
But what if you’re using a parameter in your dashboard and you would like to use this parameter as a highlighter? You can do this in just a few easy steps.
First you have to create the parameter that you would like to use. You can create a list based on an existing field, in this case Segment.
When you’re done, you right click on the parameter that you’ve created and you select Show Parameter Control. The parameter will now appear on the right side of your view, next to your graph.
After this you will make a Calculated field. This field ensures that the value you select with your parameter will get a different color and size than the other values in the dimension.
Next you will drag and drop this new field ‘Segment Highlighter’ to your Marks Card on Color and Size. When you do this you’ll notice that the segment that’s selected by the parameter has a different color and size then the other segments. The only problem now is that the line of the selected segment lies below the lines of the other segments, while you actually want it to be on top.
There’s an easy way to fix this order. Simply drag Kleur above Geen kleur in the Segment Highlighter Color Card.
The line of the selected segment is now on top of the other lines in the graph. Changing this order however also changed the order of size (the selected line is now the small one, instead of the bigger one). We need to reverse this order. Right click on the arrow on the Segment Highlighter Size Card > Edit sizes… and check the box Reversed.
And that’s it! The end result: The line of the segment you’ve selected with the parameter will be of different color and of bigger size than the lines of other segments.
N.B. The original blog is in Dutch, in the visualisations you will see “kleur” which means colour and “geen kleur” which means no colour.
I hope this blog I shared can be useful for you! If you have any more questions don’t hesitate to contact us.
In need of further explanations and help? Join our workshops and trainings or hire a consultant!
Header image from author. Screenshots from author.