Tableau Tips: Proportional brushing
Updated: Jun 1
At the heart of every data analyst is the commitment tell each data story right. While this may sound like a walk in the park, coming up with the right story and marrying it with the right chart and color requires some level of skill. Choosing the right chart or graph will determine whether your story will flow or not. Therefore, this article seeks to explore one of the technique which you may find useful in your next Tableau assignment. Our goal is to demonstrate a simple way of exploring the contribution of members to the total.
Using Superstores data set packaged with Tableau app, we’ll seek to compare Regional Sales by Sub-Category to the total Sales for all Regions. (What proportion of the Total Sales by Sub-Category did each Region contribute?).
Step 1: Build a simple Bar chart
Drag dimension Sub-Category to the Row(s) shelf.
Drag measure field Sales to the Column(s) shelf.
Chose Bar under marks card.
Step 2: Create an LOD calculated field named ‘Computed Sales’ see below
It’s good to note Tableau executes filters by the order below from top to bottom.
Our goal here is to create a field that is computed before the dimension filter is applied. Hence, the reason we’re using a FIXED level of details.
Step 3: Build a dual chart
Drag the calculated field Computed Sales to the Column(s) shelf next to SUM(Sales).
Make the charts Dual and Synchronize Axis.
Under Computed Sales axis Move Marks to the back.
Apply color appropriately.
Note; It’s hard to tell the difference before a dimension filter is applied. To test whether our computation is right, add Region filter and select ‘East Region’.
Step 4: Compute Percent of contribution
Let’s go a notch higher by showing the percent contributed by Region for each Sub-Category using the calculated field below.
Adding the above Calculated field to the Column(s) shelf and adding some color and labeling we’ve;
This technique demonstrates how powerful LODs can be in executing simple calculations in Tableau.
I hope this article was helpful to you. Thanks for reading.
See you in the next article.