First, when you use a highlight action in Tableau, it will only highlight the same values in the same field that you highlighted.
Highlighting |
When you use a filter action in Tableau, it will add a filter to the chart so that only the values with the values you selected are shown.
Filtering |
Partial Highlighting |
As you can see, when I click on Jumbo Drum, the top right bar graph highlights the appropriate portion, while still allowing us to see what the total was so that we don't lose perspective. We recently had an epiphany about accomplishing this in Tableau and it's actually pretty easy!
In order to accomplish this, we're going what's known as a "Scaffold Data Source." This idea was pioneered by Joe Mako. You can find out more information by watching his "Think Data Thursday" presentation here. Let's start by creating a regular bar graph.
Sales by Order Priority |
Duplicate Data Source |
Now, let's use the dual-axis feature to place the same set of bars on this chart again. But, this time we're going to use SUM( [Sales] ) from our duplicated data source.
Sales by Order Priority (Hidden Dual Axis) |
We renamed the [Sales] field in the secondary data source so that we knew which [Sales] was the primary. Then, we created a dual axis bar graph, made sure the primary Sales was in front, synchronized the axes, hid the Blended Sales axis and colored the Blended Sales Bar bar a lighter shade of blue. This way, it looks exactly like a regular bar graph. Next, we need to make it so that these data sources blend on every field EXCEPT Container.
Unlinking Container |
Once we do this, the secondary data source will not be filtered if we try to filter the primary data source on Container. See where this is going?
Partial Highlighting (Tableau) |
Now, when we click on Jumbo Drum in Sheet 1, the primary bar filters for Sheet 4. However, since the secondary data source is not linked over Container, the underlying bar does not filter. This gives the appearance of partial filtering! The really cool thing about this technique is that you can do it for lots of other types of charts. All you need a little imagination. Thanks for reading. We hope you found this informative.
Brad Llewellyn
Data Analytics Consultant
Mariner, LLC
llewellyn.wb@gmail.com
https://www.linkedin.com/in/bradllewellyn
Data Analytics Consultant
Mariner, LLC
llewellyn.wb@gmail.com
https://www.linkedin.com/in/bradllewellyn
Hi Brad , Was interested to learn this trick and went on trying it, But some how i dont see any change in the color of my bar graph in the dashboard.
ReplyDeleteI am attaching the link here
http://public.tableausoftware.com/views/partialhighlight/Sheet1?amp;:embed=y&:display_count=no
Vishwakar,
DeleteSorry it took me so long to respond. The issue was that you needed to right-click on the secondary axis (the top one) and click "Move Marks to Back". Your secondary data marks were obscuring the primary data marks so you couldn't see anything. I've posted the updated copy at
http://www.speedyshare.com/NxFer/partial-highlight.twbx
Firstly, thanks a lot for this post. I was under the impression that the top and pretty expensive VA software would make this intuitive and easy to do. Definitely not. As a new Tableau user I would not be able to figure this out by myself. Their documentation also did not help in my quest for this.
ReplyDeleteYou are correct that this is just one of the deficiencies in Tableau. No tool is perfect or suited for every task. The goal is to find the one that accomplishes the goal you have. Thanks for commenting!
DeleteDo the linking fields actually have to be "turned on" in the data window, or did you just remove Container from the list of fields in the "Edit Relationships" window? I'm not clear on this step.
ReplyDeleteI was able to get it working. I was confused by the line "Next, we need to make it so that these data sources blend on every field EXCEPT Container" Technically, we aren't blending on these fields -- we just need to make sure we are blending on Order Priority and NOT Container, correct? Is it possible for you to include workbook examples with your posts? Cheers, and thanks for posting!
ReplyDeleteThanks for the kind words. Perhaps I will start posting my blog examples to Tableau Public!
Delete