I was incredibly honored to present my work at the December Tableau Healthcare User Group. I had a wonderful time, and received lots of great feedback. One of most common questions I got was on how I made my small multiple graphs. For instance, here’s one showing Surgical Site Infections:
I came up with my method after seeing Michele Tessari’s talk at the 2016 Tableau Conference. I made some modifications to his technique, as I wanted to be able to hard code the columns and rows in any order. For instance, when showing Surgical Site Infections, I always want Abdominal Hysterectomy and Colon Surgery to be listed first, even though it’s out of alphabetical order. These procedures are what the government judges us on, so they need to be emphasized.
When researching this post, I found tons of other blogs with similar methods, including posts by Ben Jones, Andy Kriebel, Matt Chambers, and Ryan Sleeper. They’re all definitely worth a read. I’m sure I’ve missed some, but that should be plenty to chew on.
To get started, first make your basic graph – this is what’ll eventually be used in the small multiple. I plotted number of infections per year:
At this point, we need to define our rows and columns in terms of a Dimension. I want to display the data by Procedure, so I made a calculation for Column using a case statement on Procedure:
I also made a Row calculation:
At this point, if we simply add Row to the Rows Shelf, and add Column to the Columns Shelf, we get a nice small multiple. I added Procedure to color to better show how it’s working:
You may notice that I left the top left corner blank. I did this because I know I’m going to put a title there in my final dashboard.
Adding dynamic headers
Now, to get nice dynamic headers, I added AVG(1) as a Dual Axis measure, and changed it to a Line with 0% Opacity. Then, I put Procedure on the Label card for AVG(1), and told Tableau to label the Line Ends, unchecking “Label end of line.” This gives a label for each procedure in the top left corner of its relevant pane.
At this point, I did some quick clean-up by hiding the Column and Row headers, hiding the axis header for AVG(1), switching the date to continuous years, removing the date axis label, and switching the bars to be the maximum manual size. I also went into the Label Text Editor and add a few spaces to the left of the label to help space things a little more nicely.
Throw this in a new dashboard, hide the worksheet title and color legend, float in some text boxes for a Title and Disclaimer, and you’re cooking with gas!
Sometimes, if there are lots of category values, I use a slightly different method. The only difference is how I calculate Row and Column. I start with Index and Mod calculations:
Row and Column get modified as follows:
You may need to manually change the new Row and Column calculations to be Discrete.
If we use the new versions of Row and Column, the graph looks the same, but it’s much easier to update when new category values arise:
I hope you’ve enjoyed this edition. An interactive (and downloadable) version of this dashboard can be found here.
I realize this is a bit more technical than I’ve been in the past, but it’s all part of effectively visualizing infection prevention data!