Chapter 14. 3 Ways to Make Charming Crosstabs: Tip 2

How to Make Custom Tableau Table Headers

One drawback with my Placeholder crosstab tip in Chapter 13 is that you lose the column headers. Fortunately, you can use the same Placeholder hack to create the headers themselves. This unlocks some interesting possibilities. For example, you can color some of the headers but not others so that you can direct the end user to focus on certain fields. Or, you could color the headers based on period-over-period performance.

To create custom headers for your text tables, start a new sheet and put the Placeholder measure on the Columns Shelf once for each column in your table. For this example, let’s pretend that we’re using the Sample – Superstore dataset to look at Sales, Profit, Discount, and Quantity by Category and Sub-Category with a Placeholder table. Note that I’ve hidden the zero lines and gridlines.

Image

See the limitation with this table? No column headers for my measures. On a new sheet, I put the Placeholder measure on the Columns Shelf six times so that my two dimensions and four measures each get their own column and respective Marks Shelf that I can independently edit.

Image

For the first two column headers, I’ll leave the mark type as Text and change the column names to Category ...

Get Innovative Tableau now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.