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.
The text table is a standard Measure Names/Measure Values table, with the spacing made a little wider, and put onto the dashboard as a floating element. The KPI is set up as another floating worksheet with hidden headers and sized to go in exactly the right place. Some other notes on this technique:
- In Tableau Desktop version 8.0.1, I had to actually place the KPI worksheet 2 pixels higher for it to be vertically aligned in Tableau Public, here’s what it looks like in Desktop:
- Also, in the screenshot and the workbook above you may detect one pixel of white space between the right edge of the KPI and the background worksheet. It seems like there’s no way to get rid of all the whitespace, though we can come close. I’ve sent this and the other issue on in to Tableau support.
- Tableau doesn’t default to assigning shading to Shape, Circle, or Square Mark Types, I had to manually set that up.
If it weren’t for wanting the continuous borders and shading, those latter two issues wouldn’t even be noticeable, and generally my workbooks are for Desktop or Server/Public consumption (but not both), so the first issue, though irritating, at least has a workaround. There are definitely places where I can use this in some upcoming work!