That quote from Aliens was running through my head after our code control system had crashed without a backup. We were in the final days of testing a major release for one of the world’s largest telecom companies when a subtle defect in a hard drive controller had finally corrupted the disks enough that the contents could not be recovered, and our sysadmin hadn’t been doing regular backups because of competing priorities. I was way in over my head as a fill-in release manager while the usual guy was on vacation. I was convinced we were going to have to tell the customer that we would delay delivery by 2+ months, and along the way blow a big hole in our revenue and future deliverables.
Then someone changed my life. One of the project leads, a rugby player and bartender from MIT, sat down with me and said, “There is a way. There’s always a way.” I can still remember two things clearly from that moment: the color of the walls (a beige made darker by the shadows cast by the fluorescent light fixtures) and his eyes. I wouldn’t call what was in them confidence, more a quiet certitude. I thought about that last week when hearing Walter Isaacson describing Steve Jobs saying “Don’t be afraid.” to the Corning CEO.
There’s always a way.
User defined functions have been a feature request for Tableau for a long time now. As much as we can share workbooks, and post function formulas, none of that has really worked as easily as we’d like. Read on to get access to over 50 calculations for computing run and XbarMR (individuals and moving range) charts, and learn how you can build your own shareable & re-usable sets of user defined functions. There’s also a preview of how the upcoming Tableau version 8.1 will enhance this process!
Currently (July 2013), the #1 most-voted-for Idea for Tableau is Dynamic Parameters. Here, I’ll show you a technique for using Tableau data blending to create a dynamic, data-driven “parameter”. We’re going to use a loosely coupled secondary data source to get the information associated with the “parameter” and return that information to the primary data source, where it can be used in further calculations. Some examples of where this can be useful:
Choose one value to build a comparison to other values, such as finding the distance from a chosen origin city to a set of destination cities, or a market basket-type analysis where we want to compare one against others.
Set the limits and input data to an algorithm that is then used to create other results, for example to get a starting set of data to use to build a projection, such as an executive retirement forecast model.
Read on for a description of the technique and demos of all three options!
Last year I did the big workbook on conditional formatting to answer some really common questions on the Tableau Community Forums. One of my projects lately has been to do the same for table calculations, which are incredibly powerful, sometimes incredibly complicated, and I believe underutilized. Tableau put together a set of Top 10 Table Calculations, here’s a list I’ve compiled of the next N most-commonly useful table calculations, based on volume of questions on the forums and relative ease of construction (there’s no densification, domain padding, domain completion, or any of that stuff in this batch):
Filter Without Affecting Results
Filter Top N Without Affecting Results
Filter 1st Time Period from Difference from Prior
Sorting by a Table Calc
Comparing Selected to Group
Aggregating at Different Levels…
…And Returning Fewer Results
Filtering Out Extra Marks by Using a Duplicate on the Filters Shelf
Nesting Table Calculations to Aggregate in Different Directions
Performance – One Computation to Return Same Result to All Rows
How Many of X Did How Much of Y
Title Showing Date Range
Jittering a Scatterplot
Extending an Axis with an Invisible Reference Line
Last week I’d promised to explain why the solution for identifying whether All items in a Tableau Quick Filter were selected wouldn’t work under certain circumstances in Tableau version 8, here it is, and along the way I’ll explain why COUNTD(Customer Name) could be red and the “Cannot blend the secondary data source because one or more fields use an unsupported aggregation.” warning message.
This post on the Tableau forums led me to figure out a new trick with Quick Filters. The goal is to know whether a Quick Filter has (All) Customers selected or some subset of Customers, then return a different measure based on that flag. Just to make it a little more fun, we want this calculation to work when there are other filters present, or not, to look something like the following view based on the Superstore Sales data:
I haven’t seen this particular trick out there yet, it’s a fun one for the toolbox. When we’ve wanted to mix and match KPIs in a crosstab or text table, we’ve had to resort to multiple worksheets on a dashboard in a layout container, or a multiple axis crosstab. The former can result in various display issues because Tableau imposes certain border sizes, the latter has problems with performance due to the number of separate queries and computations that are necessary.
Tableau version 8 gives us floating dashboard elements with pixel-level precision for element location, and that gives us a third way to build text tables with KPIs.
An update: Looks like this one is a bug… Tableau guru-to-the-gurus Joe Mako noted in the comments below that this behavior doesn’t occur for strings or numbers. I’d thought I’d seen this with other data types, but I was wrong. I’ve submitted this to Tableau tech support and updated the post, I’ll do another update when I hear back from Tableau.
I’ve got at least a couple more posts in the queue about various features of Tableau version 8 blending. Here’s how to run into one undocumented feature:
Date dimension(s) in the primary and secondary have the same name, or a defined relationship(s) in the Relationships window.
The date dimension(s) from the primary is/are in the view.
The data will blend using those date dimension(s), regardless of whether the link icon is on or off.