Panel charts in Tableau

Over on the forum, Jeremy asked about making trellis charts. For more info on trellis/panel charts, John Peltier has a great article about them. Consider a case where you want to visualise two measures (eg sales and time) for a Dimension with many members, such as State. There’s no pretty way to do this in Tableau by default. Because there are lots of members in the State dimension (up to 50), you’ll end up with one of four things:

  1. A crowded line chart
  2. A very wide chart
  3. A very tall chart
  4. Something using filters to show just a few states at a time.

None of the above are ideal. Instead, you can use the principles of small multiples to arrange your dimension members into a grid.  The workbook below shows the results.

Tableau loves small multiples. I’ve blogged previously about my most satisfying creation, which used small multiples. Tableau likes small multiples that are arranged with separate dimensions on the Rows and Columns. What we’re trying to do here, though, is arrange one dimension’s members arbitrarily on a grid. The data itself contains no information that tells Tableau which row or column it should appear in. Fortunately, we can use table calculations to create that information.

1. Create an index on the Dimension that you are arranging into panels

This is nothing more than an INDEX() function, set to compute using [Customer State]. It gives each State a numerical value, rising alphabetically.

2. Create a parameter to determin the number of columns

In the view above, you can change the number of column via the Parameter slider.

3. Create a calc for the Column value

To work out the correct column for each State, the calculation uses modular arithmetic.

The calculation has to check if the modular result is zero – if it is, then that member actually needs to be in the right-most column.

4. Create a calc for the Row value

For this calculation, we don’t use modular arithmetic, but use a ceiling function based on the [index]/[columns count]. Tableau doesn’t have a native CEILING function but Alex Kerin and Joe Mako came up with some on the Forum.
That’s all we need. You can then build the worksheet as follows:

I’ve done a bit of tweaking by hiding the Row/Col value headers – they are relevant to you as the report writer, but not the viewer. I also labelled the line ends to enable identification of each panel.

Critiquing other people’s Tableau visualisations

Tableau dashboard with and without design

Tableau’s sample files wouldn’t look so good if they weren’t well designed

Alistair Knock posted a great question by Moose Peterson on Google+  about feedback on user photographs on the web:why do most people just make anodyne comments along the lines of “Nice!” when they probably have some constructive criticism they are holding back?

This got me thinking. How do I respond to seeing Tableau Public workbooks?

The more I use Tableau Public, the higher and higher I believe the bar has to be set for a successful Tableau Public visualisation. You must think like a web designer when publishing to Tableau Public. Layout, fonts, interactivity, colour, etc: these consume vast tracts of web designers’ time for a reason. Just as a badly designed web page is a disastrous advert for your brand, so too is a weak Tableau Public viz. I’ll be exploring these issues in more detail in my session, “Expose yourself with Tableau Public”, at the Tableau Customer Conference in Las Vegas in October.

An anodyne retweet of my own

What is my own reaction to seeing Tableau Public visualisations? If I like it, I’ll comment on the blog, or tweet it. Good work deserves to be praised. What about my critical thoughts? Believe me, I see areas for improvement in almost all the visualisations I see; some recent popular Tableau Public vizzes by well known members of the Tableau community have been, in my opinion, really badly designed. Have I told them? No.

If I think your workbook needs redesigning or tweaking, generally, I say nothing. Why is that?

Because I appreciate effort – at least the author is using Tableau, and having a go. I wouldn’t want them to stop that. I think most authors just want to get their data out there. They aren’t interested in someone they probably don’t know dissing what might have taken them hours to create.

Because I question my own opinions: on whose authority am I an expert in Tableau Public? What if my opinions are wrong? I don’t get much criticism of my own work; I get almost universal praise. This is brilliant, but what if everyone else is also just hiding their critical thoughts about what I do? I think I’m pretty good at this Tableau-data-viz thing (actually, I’m quite confident I am good at it), but I don’t know for sure. Stephen Few is famous for his approach of calling things exactly as he sees them. If he has a problem with your work, he’ll share that with you and with the world, and justify those opinions. As a result he is widely read and widely respected. He has also stimulated many great debates as both his supporters and detractors explore the issues he raises.

Because I’m not sure I can express my opinions in a constructive manner. Stephen Few writes excellently, justifying his opinions. I am not sure I can critique well enough to cause the author to reflect rather than get angry.

Reading through the many thoughtful comments on Moose Peterson’s G+ post, I think I should rethink my approach.

What do you think? Would you be comfortable critiquing others’ Tableau Public workbooks? Would you behave differently on the internet as you do face-to-face? Would your freedom to critique others change when you become a Tableau employee (as I will be in 6 weeks)? How would you react if I started saying “nice viz, but your dashboard layout’s all wrong”?