Make your filters do more work

At the recent UK Tableau User Group, Mel Stephenson made a great set of points:

  • Screen real estate is scarce.
  • Filters take up lots of space
  • Filters don’t show any information.

How about making worksheets that perform two functions: work as a filter and convery information?

Get that right, and you have just increased the data-ink ratio significantly.

Here’s an example. Recently, Tableau posted a great viz showing the Social Media Race and Twitter/Facebook follower counts of leading Media players. Here’s a snapshot of that viz:

But check out that Filter – it takes up, what, 15% of the whole space? Why not replace the Filter with a worksheet that shows the number of followers each person has, and add an Action Filter to it. The new version of the viz is as follows:

What I like about the new version is that you don’t need to click anything to see who has the most combined followers (Lady Gaga). The only disadvantage is that to select multiple media players, you need to use a lassoo or a Ctrl+Click action with the Mouse.

Joy of six: dynamic multi-member groups

First off, let me say that I do not take credit for the contents of this post. Credit is due to Joe Mako and Richard Leeke who responded to my questions on the Tableau Forum. This is a good time to say that if you aren’t using the forum yet, get over there to ask or answer all manner of Tableau questions from the trivial to the fiendish.

I am posting this solution because it is such a sweet use of calculated fields. Here’s the scenario: “I want the user to be able to see the top n customers’ average sales. They should be able to control the “n” value, and show or hide all the rest of the customers.” Here’s the answer:

I’m afraid I am not going to go through the solution. Why? Well, I barely understand it myself, and I don’t think I’d be able to explain it properly. I recommend you download the workbook and look at the forum thread to work it out. Otherwise, just be in awe at the work of Joe and Richard!

How to make bubble charts

Flowing data posted nice and clear instructions on how to make bubble charts using R. It’s a great post, and I thought it would be a good thing to show how to create the same chart in Tableau. Readers can compare and contrast the ease of each. Let me know your thoughts in the comments below. Here’s the end result using Tableau:

To create this:

Step 0: Download Tableau Public

This example uses Tableau, so you’ll need that.

Step 1: Download the data file

It’s here:

Step 2: Connect Tableau to the data

Step 3: Build your bubble chart

You only need five Dimensions/Measures on the worksheet to make the view look the same as the one on Flowing Data. I added Colour to State in order to create the highlighting option in the dashboard above. Is this cheating – it’s 6 drag and drops – is that 6 separate steps? 🙂

Step 4: Clean up!

I prettified it a bit by changing the Mark borders and putting it into a well-proportioned dashboard.

The whole process took me 15 minutes. Once your up to speed with Tableau, you can get to work at lightning speeds.

Flowing Data’s post started off by mentioning Hans Rosling and the Gapminder project. Watch this space for more on Gapminder and Tableau….

The joy of six: one against the rest

This is the third post on simple tricks that are available in version 6. This one represents a common request we get. The client says “I want to compare the performance of x against everyone else.” What is x? Well, it could be Customers, Departments, Countries, anything.

Parameters once again make this easy:

The drop-down filter is a parameter control, in this example showing every State in the Coffee Chain connection. The Tableau devs have made it easy to create a parameter containing every member of a Dimension. Right-click on the State Dimension, and choose Create Parameter…:

That’s your parameter list created – show the parameter control on your worksheet by right-clicking on the parameter and choosing Show parameter control.

Next up we create a calculated field to return either the State selected in the parameter, or all the others. This is essentially a dynamic Group, with one lone member of the Dimension, and everyone lumped together in the “Other” category. In this case, you can call the “Other” category anything you want. Here’s the calculated field:

This is the field you drop onto your worksheet. Whichever shelf it is on, it will only show two members: the State selected in the Parameter, and everyone else lumped together.

The joy of six: add an “About” box

You may have seen my response to an Information is Beautiful post. Here’s the viz I used in that post:

This uses sheet tabs to create an “About this viz” tab. It is good practise to credit data sources and date your vizualisation. The About Box allows you to do this. I’ve used parameters to store the hyperlinks, and dropped them onto worksheets embedded into the “About this viz” dashboard.

Prior to v6, the choice was either to omit the credits, or squeeze them into your dashboard somehwere. No more!

Wikipedia banner tests: a response to Information is Beautiful

One can always expect visually attractive stuff from David McCandless on his Information is Beautiful blog. Sometimes though, the visual displays potentially confuse viewers. Today’s great post on Wikipedia Banner Tests is an example. Representing the size of donations using a square is pretty, for sure. However, we tend to perceive the relationship of one area to another pretty badly. A linear representation is more effective:

Think back to David’s orginal squares view – would you really have guessed that the Jimmy Appeal raised fifteen times much cash? If so, you’re one of the few – most people would have said it was around 8-10 times larger. The linear view above makes that difference much more clear.

There’s also some interactivity on my view – you can change the measures being displayed in order to explore the data a little more.


The joy of six: easy error bars

Over on the forum, Hadbar asked a question about Error Bars. He asked the question back in the days of version 5, when it wasn’t straightforward to make a pleasant error bar. However, now we have the Joy of Six, we can use the new dual axis/multiple mark features to create some visually appealing error bars:

Tableau won’t calculate the error values for you, so you need those in your dataset. With this example, you need two measures:

  • Error – the magnitude of the error
  • Error lower – the lower limit of the error bar

Here’s how we build the viz. First make a regular bar chart with the relevant Dimension and Measure, as below:

To create the error bar, we build a Gantt chart on the second axis. It’s lower limit is the value of the Error lower measure, and it’s size (height) is the size of the error. Step one is to put the MIN(Error Lower) pill on the Rows shelf, and set it to use Dual Axis (click the picture to see details):

We’ve now got a dual axis graph, but there’s some way to go yet. The Error Bars need to use a different mark type, in this case a Gantt Bar. Right-click on the axis, and choose Mark Type…Gantt Bar:

Set the Size of the Gantt Bar to the size of the error. To do this, make sure the Marks shelf is showing the correct Mark. In this case, it’s MIN(Error Lower). This is a new feature in v6. In case you’ve not seen it, you can page through all the Marks:

Once you have found the correct mark, put the Error measure onto the Size shelf – that creates the Gantt bar with the height of the error. You’ll probably now notice that you have error bars, but they’re wide, and not in the right position relative to the bar. This fat bar problem is easily fixed – just slide the Size slider on the Mark shelf to be the smallest possible. That creates a nice thin line.

How to get the error bars to align correctly? Simple – right-click on the axis and choose Synchronise Axis. While you’re there, you don’t need to show the right-hand axis at all. You can’t properly hide axes in Tableau, but you can format them so they don’t appear. Right-click on the axis and choose Edit axis. Delete the title on the General tab, and in the Tick Marks tab, set the Minor and Major Tick Marks to None. Click OK and your axis has “disappeared”.

Lo and behold – you have some error bars. Play around with widths/colours and other settings to make it appear just how you want it. Coming next in the Joy Of Six series…. using parameters to create dynamic groups.

The joy of six: user-built views

Today is the Joy of Six day. Tableau v6 is incredible, and I’ve been lucky to have had my hands on the beta versions for a while. The Tableau site itself is a great resource for learning about the amazing new features and how to use them. I wanted to do a series of posts about how these new features are already being practically applied to solve our own real world problems.

A common problem we see is that we build a view for a user, only to have them say, “Hey, that’s great, but instead of Profit, can you show Sales? Oh, and also, I’d like to see it broken down by Container, not State”. In the old days (pre v6) you had to build a view for each request. Not now. Oh no. Not now. Now you can build in masses more flexibility into your views.

The dashboard below shows an example using Tableau’s sample data:

How do we do this trick? First let’s look at the pills that build this view.

Instead of using the actual dimensions or measures, each pill is either a parameter, eg “Choose columns”, or a calculated field based on a parameter, eg “Chosen column dim”.

There are four parameters in this view (for more on Parameters, check out this video on Tableau’s own site):

Each of these is a String List, looking something like this:

Each item in the List of values box should be a Dimension (in the above image) or a Measure (not shown) you want to the user to be able to choose. You need a parameter for each user-editable area of the worksheet.  In my example, that’s a parameter for Row, Colum, Bar length, and Colour.

Once you have your parameters, show them all on the worksheet (right-click on the Parameter name and choose Show parameter control).

Our next step is to connect some calculated fields to each parameter. The “Bar” calculated field looks like this:

The IF statement returns a different Measure, depending on the value of the Parameter.  There are four calculated fields – one for each parameter. I created the following for the viz above:

  • Chosen row dim
  • Chosen column dim
  • Bar
  • Colour

Now you can build your view – drop the calculated fields onto the relevant shelf, and you should now have a dynamic view where the user gets to choose what they want to see.

The final thing you should do is format the tooltips, as the default ones will make no sense. See my previous posts on tooltips for some tips.

Download the workbook to explore how it’s done in more detail.