IF YOU HAVE NOT READ http://drawingwithnumbers.artisart.org/using-a-filter-action-as-a-parameter/ BY JONATHAN DRUMMEY, STOP READING NOW!
Everything I am going to show is based on Jonathan's technique to simulate a Parameter using a Dashboard Action. For my examples, I am using the Union Scaffold Technique. After you have read/understand his post, come back here to see some examples on how to use it?
After you have read Jonathan's blog post, let's start with some examples!
Connect Scatter Plot on Hover
As Jonathan describes in his post, the first thing I am going to do is Setup a Union scaffold of my datasource. This will allow me to set a Target and Source field to work off of.
Begin by setting up the sheet with Category and Year, then bringing over the blended Sales and Profit
Next, we need to setup a field that we will filter on, to identify which marks we need to do additional work with.
[Category Include]
[Category] + [IncludeExclude]
Note* Here [Include-Exclude] is driven by the Union, i.e. I have one Table be set to Include, and the other set to Exclude.
Add this to the detail shelf.
Next add the sheet to a Dashboard so we can setup a Dashboard Action. Then create a Dashboard Action like so.
Here we are doing a few things. One, we are setter the Filter to Select and Leaving it, we need this so the Action Filter Set remains in place on the Worksheet, so we can adjust it.
We are also setting up the Action so that it directly affects the sheet in question, i.e. I am using the sheet to filter the sheet.
Finally, I am using the Category-Include field as the filter.
Go back to the Sheet and click on a mark.
As you would expect, the filter is working as we might expect. We clicked on a Category, and the sheet filtered it. So what's the trick?
Now on the Action Filter, notice that each Category has two values, one for Include and one for Exclude. By setting the Action to Exclude, we only remove one instance of the Category. This means we can use an LoD to identify which Category has been excluded.
So I am going to setup a Dual Axis that only renders when there is one category in the in view.
[Dual]
IF MAX({ EXCLUDE [Category-Include] : SUM(1) } = 1) THEN SUM([Sample - Superstore].[Profit]) END
*The trick: By excluding the [Category-Include] field, we can test to see how many "Categories" are in the view. If there is only 1, we know that we have excluded the other mark. So we can take that and tell Tableau to grab another instance of Profit.
Add this to you sheet as a Dual Axis and Synchronize, remove Measure Names and change the Mark to Line.
Now we have what we need. So the last step is to go back to the Dashboard Action and set it to Hover and Show All Values
This will allow you to hover over marks, trigger the filter, then instantiate the Dual Axis.
And viola! Connect a Scatterplot on Hover!
Other Options
The following are gifs of other examples on how to utilize this trick. They all work on the same premise, just in slightly different ways.
Halo on Hover
Super Bump Chart Highlight
Dynamic Reference Bands with Highlight
Self Highlighting Bar Chart
Here are the examples in a workbook. Feel free to download it and play around with the concepts.
Note* This is a hack, and a bit buggy on Tableau Public.












0 Comment