In my last post, I summarised a great tip from Pablo Sáenz d Tejada, making use of the hitherto unknown SIGN() function. At the same session, Pablo’s fellow Data School graduate Lorna Eden also came up with some excellent little tricks.

A perk of the new social media platform (Workspace by Facebook) used at the London TUG, is that the content from the evening was uploaded into a Group in the app, so my failing memory got a kickstart and I can relay a couple of Lorna’s tips now.

First up, Lorna demonstrated a nice way of using Measure Names as a Header when wrestling with tables in Tableau. In the first example using Superstore data, she showed how this works with Dimensions:

Screen Shot 2017-02-04 at 20.33.24.png

The ‘abc’ column is annoying, isn’t it? You can do a couple of things here. The way I knew was that you could create a “blank” calculation and drop that on Text:

screen-shot-2017-02-04-at-20-34-44

Screen Shot 2017-02-04 at 20.35.26.png

You could then shrink the width of the column, take off the Row Banding and remove Column Dividers, and nobody would be any the wiser. What Lorna showed was different as she wanted to drop Order Date onto columns. She started by dragging another instance of Order Date onto Text. Note the absence of a Header:

Screen Shot 2017-02-04 at 20.37.07.png

Next, Lorna shoved the Measure Names “field” onto Columns, but “No Measure Value” appeared:

Screen Shot 2017-02-04 at 20.38.34.png

To get round this, you can just edit the alias of that field, hide the Header for the original Order Date and you’re done:

screen-shot-2017-02-04-at-20-40-15

screen-shot-2017-02-04-at-20-40-26

A similar principle applies with Measures too. In a second example, Lorna showed this initial view:

Screen Shot 2017-02-04 at 20.44.49.png

Sales in columns, but a viewer of a final dashboard containing this view wouldn’t know that, as there is no Header. To resolve that, you can just drag and drop Measure Values on top of the Sales value in the column:

screen-shot-2017-02-04-at-20-47-24

Doing this adds the Header, and you can see an instance of Measure Names on Columns and the Filters shelf. I liked that tip, but I preferred the next one which was titled “Single colour using colour palettes”.

The idea is to get round Tableau removing access to custom (and default) colour palettes when using single Measures. If you put a multi-member Dimension on colour, you get this:

Screen Shot 2017-02-04 at 20.51.34.png

Nice and easy. But if you add a Measure or single-member Dimension, you get restricted options:

Screen Shot 2017-02-04 at 20.54.19.png

Sales is on Text, and I can only select colours from a limited range of options. In this case, the solution is to create a singular, in-line dummy calculation:

Screen Shot 2017-02-04 at 20.55.38.png

If you drag the resultant blue pill onto colour:

Screen Shot 2017-02-04 at 20.56.43.png

Bingo! You can edit the colours of the newly created card and access the default palettes, plus any custom ones you may have created.

Advertisements