Tableau Set Action Explained #WorkoutWednesday W44-45

Drilldown Final.gif

In the last 2 weeks right after or during the TC18, Tableau revealed a few very interesting features for Tableau 2018.3, one of which was an addition to our workbook / dashboard Action, which is ‘Change Set Values…’

The steps are very simple:

a. Create sets based on the drill down etc

b. Write a formula including the sets to make it behave as per your analysis

c. Create the set action and test your viz.

WorkoutWednesday Week 45

set action.png

The Tableau community has been very excited with this addition, and why not. It makes our lives much more easier when building dasboards in Tableau and when detailed analysis is required. Earlier it was possible but required lot of data modelling and was slower. Here I will explain how to use Set Action for interactivity by using these beautifully done Workoutwednesday dashboards by @AnnUJackson and @RodyZakovich.

Lets get into then. First of I will display the week 45th wow dashboard here.

set act 2.gif

Here is how it is done. (Set Action Only). Make sure in the ‘Marks’ it is a square not text.

 

  1. First of all, let’s create a parameter for the X axis which can be either Region or Segment; similarly create a parameter for Y axis which can be Category or Sub-Category. Now create calculated field X and Y, which is just to change the Values w.r.t the chosen option in the paramters. This is how the X looks like, see below. Y will be similar but will be along the Y axis parameter.tab X.png
  2.  Now create a set using the “X” and “Y” calculated fields. Remember the idea is to   highlight and not filter. So the sets will look like this, If X is ‘Region’ or Y is ‘Sub-Category’. It can be any row on which the mouse hovers over. set x.pngSet Y, similarly can be any column the mouse hovers over.set y.png
  3. Create a calculated field depending on the behaviour; we want a highlighted criss-cross, depending where the mouse is on the table. So the formula will be used in the color mark. So we will say if set X or Y then 1 else -1. In the color mark we will set it as max(selected) selected.png
  4. In the color pane give 1 the highlight color you like. color.png
  5. Final piece of the puzzle: create the action sets.Set XY.gifTest the set action and you are done.

 

 

WorkoutWednesday Week44

Now let’s have a look at other fantastic uses of Set Action.

Drilldown set.gif

Here are two seperate uses of set action, one being the line graph, wherein you can drill down into detailed date analysys from years to months etc.

Second is the tree map, wherein you can drill down till the product name level and its sales value.

  1. The time chart is simple – Sales on Y axis and Month on X axis. We created the set time, which includes all the months in the data set, and we will be using this to filter our next worksheet, which is the TreeMap. So we put the Set in the filter area and check ‘In’ only. Set this for both line chart and the tree map worksheet.month in.png
  2.  So we want to select smaller chunks of date ranges using our mouse and would want the viz to show the line chart only for that range. Simply creating the set action will allow us to achieve this, since we have the set in the filters panel. There’s no requirement of any calculated field. The “In” filter will take care of it as shown above.Drilldown stime sa.gif
  3. For the TreeMap, we have created one set for a combination of Category and Sub-Category and also a calculation field to make the set action to drill down to sub-category from categorycat sub.png
  4. The formula for drilling down to Sub-Category is dd subcat.png
  5. We will use this formula to create our second set, so that we can drill down further from the resultant Sub-Cat to Product name.set2.png
  6. Like always, here is the last step, creating the Set Action for drill down from Category -> SubCategory -> ProductnameDrilldown treemap.gif

 

 

 

 

Workout Wednesday W29 – 2018, Order Profit

I have been participating in this for a few weeks now and am totally enjoying myself. It helps me, and anyone who participates, think in directions one wouldn’t have otherwise. Please find the challenge here.

Dashboard 1.png

interactive viz

I will not go into details of how I solved this weeks workout; instead I will only touch the main areas and things that makes these workouts special. I couldn’t resist myself and had to go through the spoilers.

The most important spoiler was **

  • ROUND({FIXED [Order ID], [Sub-Category] : SUM([Profit])}/[Round Parameter]) * [Round Parameter]

I think  @LukeStanke was feeling very generous this time. Lets get to business now.

Step 1:

Create the Parameter of type integer and type list with all the values in it $25, $50, $100, $250, $500 and $1000. then create the calculated field using the hint as mentioned above as “Profit per order Rounded”. Make sure it’s a “Dimension” and “Continuous”

Step 2:

Filter plays a very important role. Use Ctrl and drag the “Profit per order Rounded” pill into Filter, chose range -1500 to 1500. Also filter it to category “Technology” You may or may not convert them to context filters.

Step 3:

Follow the X axis and Y axis instructions as mentioned in the workout. Create a field called “Bar Size” using the parameter you have created. Make it of the dimension type so that when you put it in the “size” mark it doesn’t do any aggregation. It is important to keep the bar width equal.

 

Step 4:

Put sub-category pill into colors. In colors use less than 60% opacity. You are almost there now.

Step 5:

Sorting is important, use manual sorting for the field subcategory, so whichever worksheet is highlighting, or whatever subcategory, keep that at the top.

Here is the final and the most fun part: the bars need to overlap, but how?

Analysis->Stack Marks->Off

Follow the formatting as required and we are done. Thanks, Luke, for another amazing workout.

 

 

Design a site like this with WordPress.com
Get started