9 tips to use Tableau like a PRO!
Here are 9 Tableau tips I picked up from my work to help you rock and roll with the tool.
1. Un-hiding all worksheets en masse
You've got a workbook with lots of dashboards and hidden worksheets and you want to unhide them all. Tableau doesn't give you this option, although it's been floating in the community for a while.
- Save your workbook and close all your data sources – Yes, close them.
- Now, click on one of your blank sheets and hit Ctrl-Z. The undo will re-connect to your data sources but the sheets fed from each one will be unhidden.
2. Filtering a dashboard with multiple data sources
Sometimes you'll build dashboards or views containing data from multiple sources. Unfortunately, you can't filter these different sources by default. But, there is a way around this.
Step 1: Create a parameter with the list of options for what you want to filter, e.g. a list of strings or a range of integers.
Step 2: Create a calculated field with a function like:
Drag this calculated field to the filter shelf and keep only 'True' values.
You can make your parameter behave even more like a filter by including an option of "(All)" and amending your calculation to something like:
You can take the approach of combining parameters and calculated fields further, e.g. to build drop-down menus to select how to split a chart, sort a table or colour a map. The best use I've ever seen is a fellow trainer who used a drop-down parameter to let users select movie characters and their pictures and famous quotes would appear.
3. More specific URL actions
I was recently building a dashboard for a bank who wanted to include a URL action to the websites of their clients. Unfortunately, they didn't have all the websites they needed and we had to google them.
This is straightforward by making a calculated URL field with the following calculation:
and including it in a dashboard action.
A results page isn't a good proxy for a website, so we can amend the URL to simulate the "I'm feeling lucky" feature and go straight to the first result:
If you want an image specifically, you can include the image search filter, tbm=isch:
4. In what order are filters applied?
This isn't a hack so much as a cheat sheet for anyone who's ever been confused, frustrated or flummoxed by Tableau's filter logic. A shout out to Joe Mako on Tableau community for a really great entry on this that you can find in full here.
Filters are evaluated in the following order:
1. Context filters
2.Top/ConditionGeneral non-aggregated filters (inc. dimensions, groups, bins, sets and actions)
3.Aggregated measures (see below for filtering by discrete aggregations)
5. Other late filtering / hiding (e.g. hide, paging)
5. Making a table of dimensions / differently formatted columns
I try to steer clients away from using tables to represent data where possible. But sometimes it's unavoidable, and it's useful to make them look a bit better than Tableau does out of the box. The 3 examples I frequently see are: plotting tables where the information in each column is a dimension, colouring only certain columns, or using different mark types e.g. to have a column of KPI symbols.
To do this, you need to create 2 dummy measures to provide the axes, and have your column dimensions as labels:
1. Drag whatever dimension you're splitting by to the Rows shelf.
2. Create a calculated field with the formula (see below) and drag it to the x-axis:
3. Hide the tick marks and label, and fix the axis to 0-2 and you have a column.
4.To get a header on your column, create another calculated field with a single value, e.g.
IF 1 = 0 THEN 1 ELSE Null END
and add it to your existing 'column' as a dual axis.
Again, hide the tick marks, and change the name of the axis to the field that will be stored in that column
6. Moving table headers to the bottom
Dimension headers normally belong at the top of a chart, and a measure axis at the bottom. If you want to hack Tableau into not doing this, here's how:
1. Build your table as normal.
2. Then create a calculated field with the formula:
and drag it onto rows. The presence of the vertical axis forces the dimension headers to the bottom of the view.
3. Now fix the axes of this dummy field to 0-2 and hide the axis header. Dragging borders around a bit gives you a table that looks good and has footers.
7. Filtering by calculated fields
Sometimes it's useful to be able to filter using a calculated field involving aggregations, e.g. keeping only products where the profit margin is above 10%:
Unfortunately, Tableau doesn't allow filtering on discrete ("Keep" vs "Hide") aggregated ("SUM") fields. You can get round this by making the output continuous rather than discrete. Change the above formula to:
Convert the field to continuous, drag it onto the filter shelf, and filter from 1 to 1.
8. Creating a Pareto chart
This isn't a "tip" so much as something that lots of people struggle to remember. So, to build a pareto chart:
1. Drag your measure onto columns
2. Drag your dimension onto rows AND the detail card
3. Sort your measure high -> low
4. Change your dimension to COUNTD([Dimension])
5. To both your measure and dimension, add a table calculation of "Running Total" along [Dimension Name] with a secondary calculation of "Percent of Total" along [Dimension Name]
Bonus – if you want to add reference lines to show what % of the dimension accounts for P % of the measure, e.g. 80%:
6. For both your pills, open the table calc dialogue, click "Customise" and save them as a new calculated field, e.g.
"% of [Measure Name]"
7. Add a reference line to the Measure (y-axis) and create a "Target Percentage" parameter with a current value of 0.8 (formatted to %)
8. Create a calculated field called "Intersection" with the following formula (using Revenue and Client as example fields):
9. Drag Intersection to the Detail mark and add it as a reference line to the Dimension (x-axis)
10. Set the aggregation to Maximum
You now have a chart that shows the distribution of a measure across the distribution of a dimension, with dynamic reference lines.
9. Creating a dashboard contents page on Tableau Server
It can be a pain to try and tell a clear narrative when showing reports on Tableau Server – especially when you have to navigate between different views, and even more so when those views are in different projects. To get around this, I use a "contents" dashboard with a list of links down the right hand side that let you change what is displayed in a central canvas...
1. Create a table in Excel with two columns (dashboard name and URL) and copy it into Tableau. The URL field should contain the links on Tableau Server corresponding to the dashboards listed.
2. Create a list of dashboard names by dragging [Dashboard Name] to rows and to label, and then hiding the header
3. Add [URL] to detail
4. Add this sheet to your navigation dashboard
5. Add a URL container and set the link as <URL>
6. Use dashboard actions so that the URL in the container is driven by the value you select in the table of dashboards
Find out more about Tableau, download a free trial and learn about our Tableau training courses.