Interactive Statistical Analysis

Filippos Lymperopoulos
3 min readMar 8, 2019

--

Authors can quickly access selection summary data via a single click, but how can consumers interactively retrieve contextual summaries for their selections?

With Set Actions, we can capture the selected marks and retrieve measure values that are aggregated at the view’s level of detail. As such, we can show things like Median, Average, Standard Deviation in context of an overall measure’s distribution.

Let’s see how this is done.

We start off by looking at a scatterplot showing Sales and Profit figures for rows in our table uniquely identified by a Sub-Category and Manufacturer value combination.

We want to define a set from the viz LOD that will return Sales and Profit values for that multi-dimensional specification.

We can then get the SUM of the Sales values that map to the selected set members and fix that to the level of the source sheet in order to use that table of values as the input to any aggregation function we want.

If we want to get the Median Sales value, all we have to do is wrap this expression with the Median function.

Define a Set Action that changes the values in the Selection Set, as follows.

In a separate sheet now we can drop this calculation on Detail (resulting in AGG(Median Sales) and render a reference line that tracks the Total value of this query. Selecting marks in the scatterplot repositions the reference line in the Sales distribution plot.

To make this more contextually relevant and reduce dashboard real estate this analysis may occupy, we can bring the distribution viz in the ViT. Remember to remove filter attributes from the ViT markdown (filter=“”) to see the aggregated value in context.

Finally, we can calculate the selection’s Mean value and repeat the exact same logic for Profit.

With Set Actions you can customize what information your consumers can retrieve from their selections and help them answer new questions.

Mayyyyybe though, Parameter Actions will make this significantly easier.

Tableau’s 19.2 Beta 2 is coming out soon, make sure you check it out ;)

--

--

Filippos Lymperopoulos

Product Manager @tableau; formerly @edXOnline and @ericsson | @OlinCollege