Mini Tableau Hacks
Part One
If you’ve ever run into a hurdle in Tableau that you feel there should be a really simply solution for, but
you end up spending way more time than necessary just trying to figure it out… that makes you more
a part of the Tableau family than anything else.
That said, time is money; so here are some nifty tricks worth keeping in your back pocket:
1. Replacing a measure on the ‘Colour’ card without losing the existing colour settings:
If you simply double-click inside the pill being used on colour and replace the field reference
with the name of the new field you want, you’ll retain all the colour settings you’ve already
applied. The only caveat here is it only works with measures; not discrete values.
2. Adding a Dummy Field to Your Dataset:
There is a function called RANDOM() which doesn’t appear under the list of available
functions, but it is there. If you create a field using this function, it will provide you with decimal
values between 0 – 1, which can serve as the perfect place-filler for demonstration purposes
until the necessary data has been prepared.
3. Adding a Line Break to a String Calculation:
For whatever reason, sometimes you just need a calculated field to have a line break in
between rows of text, without creating a separate calculation for each. You can do this by
adding line breaks in between quotation marks.
4. MIN() and MAX() Can Be Applied to Strings to Find the First and Last Value in the Data
Set:
If you want to find the very last value in a string field, you could use MAX() to find it. You could
even use this logic within an LoD expression, like {FIXED : MAX([name])} The results are
based on the default dataset order applied to the string, which is usually alphabetical, and not
the user-defined sorting order. For example: MIN("Andy","Brent") = "Andy"
5. Adding Aliases to Boolean Values:
This one may be obvious to most; but I personally have been caught by this. Boolean aliases
of TRUE and FALSE can be edited just like a normal string value; so you can change TRUE
to something like ‘Meets criteria’ without having to make a secondary string calculation in
order to achieve this.
6. Add Custom Heading to Final Column in a Text Table:
Usually when creating a tabular or table view in Tableau, you have the issue of no heading
appearing for the final column; AKA the field you place onto the ‘Text’ card. You can resolve
this simply by double-clicking into an empty section of the Columns shelf and adding
whatever label you prefer inside of quotation marks. To tidy it up, simply right click on the field
label that appears above your custom heading and select ‘Hide Field Labels for Columns’.
7. Applying Settings to Logic that Doesn’t Yet Exist:
Ever needed to set the categorical colour value for a condition that doesn’t yet show in the
data set? Or set a filter based on the same? For colours, you can simply make the opposite
true so that the condition which does exist represents the value you want to add the
colour to; add the colour to it and then correct the logic in the calculation. Now Tableau will
remember the colour settings you applied to that value for when it appears again. As for
filters, you could pretty much do the same thing, but what even I didn’t realize for a long time
was that you could simply go to ‘custom value list’ on the filter’s ‘General’ tab of the pop-up
window and type in the exact value there, click the ‘plus’ icon, select your newly added value
and save.
8. Using Dummy Axes for Custom Views:
Sometimes the limitations of the default chart options in Tableau present little headaches, like
not being able to align your text exactly where you want it. Take the Circle chart; even if you
set the view to ‘Fit Width’, setting the label alignment to left or right-align aligns the labels to
the window edge, not the circle itself. However, if you were to create a dummy axis by double-
clicking in the blank area of the Columns shelf and typing something like SUM(0), you could
convert that into a Circle chart, and now your text will be aligned around the circles, not the
window frame. Plus, you can always have more than one dummy axis in a view, which allows
you to place multiple custom visuals in one view or make a more interesting version of a
regular table.
9. Getting the Date Part You Want in a View Straight Away:
I don't know about you, but I would find it incredibly tedious if I always had to first drag the date field
into the view, then switch to whatever date part you wanted and then (if you were looking for
the exact date) convert it to a discrete value. But this can all be bypassed by simply right-click
dragging the field into the view, which will present you with these aggregations as well as
continuous vs discrete variants straight away.
10. Adding the Required Level of Detail to a View without Breaking It:
I think we’ve all had our fair share of ‘the level of detail is not available in your view’
messages, which is enough to make you want to pull your hair out. But if your view happens
to contain an odd number of axes, like a simple bar chart does, you can add a dummy axis like
we mentioned above, set it to something inconspicuous like a Circle chart, completely reduce
size and opacity, disable all tooltips and place the level of detail you need onto that. Then
create a Dual Axis between this dummy axis and the original, synchronize them and make
sure it appears behind the original in viewing order, and voila! Problem solved with the use of an invisible, hidden axis.
11. Creating a Row-Level Tabular View without using Table Calculations:
It’s very popular to use a discrete version of INDEX() or RANK() as a hidden first column to
create the itemized, row-level appearance of a view and avoid the standard grouped
hierarchy appearance; however, sometimes the data is just too large and using table
calculations like this can impact performance. An alternative is to take whatever measure you
sort your view by, add that as a column and convert it to a discrete field; place it as the first
column, sort it by itself and hide it, just as you technically would do with the table calculations.
If you need to sort at an hierarchy or grouping level within the table, similar to what could be
achieved with a RANK() field, then use an LOD to achieve this. For example, if SUM(Sales)
was what you would be using but you wanted to maintain the row-level appearance whilst still
sorting by a higher level of detail in the view, such as ‘Category’, you could create an LoD
similar to {FIXED [Category] : SUM([Sales])} and add that field as a hidden column instead,
sorting by itself.
12. Adding a Custom Categorical Colour without Having to Create a Brand New Palette
When you add a discrete field onto Colour like ‘Categories’ or a conditional string calculation,
sometimes you need a colour that just isn’t available under the “Tableau 20” or any other
palette. But instead of trying to find the Preferences file on your system and learning a bit of
code, you can simply double click on the colour swatch you want to edit and the custom
colour settings popup will appear:
13. An Odd Way to Improve Performance (Don’t Ask Me Why):
I can’t provide you with any verifiable documentation on this, all I know is that I once worked
on a workbook that gave endless performance issues and all the testing and troubleshooting
in the world wasn’t helping us locate the issue. So one day we were desperate and started
looking at tooltips, but views with disabled tooltips. We noticed that aside from the ‘Show
tooltips’ option, there was also ‘Include command buttons’ and ‘Allow selection by category’;
which in theory shouldn’t matter if ‘Show tooltips’ is disabled in the first place. Nonetheless,
for some bizarre reason, when we disabled those last two as well, the workbook’s
performance picked up significantly. Go figure.
Thanks for reading; we hope these helped!