The world’s leading publication for data science, AI, and ML professionals.

5 Lesser Known Tableau Tips, Tricks & Hacks. With Use-Case + Demo.

Do you know all of them?

While other fellow Medium writers and Tableau users have their own list of hacks to share, here is my version of the list of Tableau workarounds which have worked well for my personal use-cases, some of which I have found by pure coincidence. Hopefully, the following 5 Tableau workarounds which I have found little to no documentation on may be useful for some Tableau users reading this 🙃

1. Plotting a Background Image as a Basemap

While I have briefly shared this in another article I have written, it was rather glossed over previously so I decided to reiterate this point here.

Use-Case: Plotting Custom Map Layer of a Transportation Route

Image by Author | A Tableau worksheet which renders a transportation route | No Basemap has been rendered
Image by Author | A Tableau worksheet which renders a transportation route | No Basemap has been rendered

At times Basemap services may not have the details you desire or in some situations when the required Basemap service is not accessible, plotting a background map image is 1 such alternative. To do this with minimal hassle, feel free to visit a Tableau Utility web app I have created at: Tableau Data Utility

Under the tab [SPATIAL → CSV]:

Image by Author | Header Bar of Web App
Image by Author | Header Bar of Web App

Scroll all the way to bottom and you will eventually come across this:

Image by Author | Previewing a functionality on the web app | The above enables the user to export out the map image for use in the Tableau dashboard as a background Basemap
Image by Author | Previewing a functionality on the web app | The above enables the user to export out the map image for use in the Tableau dashboard as a background Basemap

Proceed to orientate the map to your desired view and select [Export Map Image]. Thereafter, in your Tableau dashboard, select "Import background image" from the header menu and input the required coordinates –Note: On the web app, note down the coordinates rendered below the map image as those coordinates are the exact same coordinates you should be plotting for the background image.

Image by Author | These coordinates correspond to the exact coordinates in Tableau when plotting the background image as a Basemap
Image by Author | These coordinates correspond to the exact coordinates in Tableau when plotting the background image as a Basemap

Result on Tableau:

Image by Author | (Left) Route without Basemap | (Right) Route with imported map image
Image by Author | (Left) Route without Basemap | (Right) Route with imported map image

Note: To change the choice of Basemap you wish to export from the Tableau Utility app, feel free to key in another Basemap URL as shown below:

Image by Author | (Left) Uses default basemap | (Right) Uses an alternative map service i.e. OneMap - Note that the user's input must be a XYZ Basemap Tile Service a.k.a. Slippy Map
Image by Author | (Left) Uses default basemap | (Right) Uses an alternative map service i.e. OneMap – Note that the user’s input must be a XYZ Basemap Tile Service a.k.a. Slippy Map

2. Toggle Worksheet Views with a Parameter

Another old trick in the book I have often used in my works in order to save extra space on my dashboards include toggling between 2 views on the same dashboard.

Use-Case: Render different Chart Type for the same data points

  • Step 1. Create a parameter [Select Chart]
  • Step 2. Create a calculated field [Line Chart]
  • Step 3. Create a calculated field [Bar Chart]
Image by Author | Create the parameter [Select Chart], calculated field [Line Chart] and calculated field [Bar Chart]
Image by Author | Create the parameter [Select Chart], calculated field [Line Chart] and calculated field [Bar Chart]

Thereafter, proceed to drag the 2 calculated fields as follows:

Screen Capture by Author | Drag the [Line Chart] calculated field to the filters on the worksheet of the line chart | Drag the [Bar Chart] calculated field to the filters on the worksheet of the bar chart | Both fields are set to "At least 1"
Screen Capture by Author | Drag the [Line Chart] calculated field to the filters on the worksheet of the line chart | Drag the [Bar Chart] calculated field to the filters on the worksheet of the bar chart | Both fields are set to "At least 1"

And there you have it:

Screen Capture by Author | Demonstrating switching between Line Chart and Bar Chart with the parameter value(s)
Screen Capture by Author | Demonstrating switching between Line Chart and Bar Chart with the parameter value(s)

3. Create Sorted Chart Layout with RANK()

Some Tableau users may notice that despite using the sort options present in the header of the dashboard, the chart layout however reverts to its shuffled and unsorted state whenever the data source updates itself.

Image by Author | The respective sort icons present on the Tableau Workbook
Image by Author | The respective sort icons present on the Tableau Workbook

To ensure that the chart stays sorted, create a separate field called [Rank Sales]:

Image by Author | Assuming that the measures to be sorted is SUM([Sales]), wrap that entity around with the RANK() function
Image by Author | Assuming that the measures to be sorted is SUM([Sales]), wrap that entity around with the RANK() function

Thereafter, drag the field [Rank Sales] as follows:

Screen Capture by Author | Change the field [Rank Sales] to discrete. | Proceed to drag it in front of the dimension field [Sub-Category]
Screen Capture by Author | Change the field [Rank Sales] to discrete. | Proceed to drag it in front of the dimension field [Sub-Category]

Hence the next time the data source updates again, the bar chart above would still remain in its sorted form (FYI: To hide the column [Rank Sales], simply right-click and de-select "Show Header" for that field.)

4. Use ❝Join Calculation❞ to Map Data Sources

In certain data visualisations where data sources on different countries are included, it is rather commonplace to encounter Country names which are encoded differently.

Use-Case: Mapping Country Names from 2 different data sources

Thankfully, Tableau enables users to ❝Create a Join Calculation❞ which enables users to leverage on Tableau’s formulas and equations to map different data sources via a single calculated field. The following illustrates how this can be done:

Illustration by Author | (1) On the data source page, select [Create Join Calculation] between the 2 different data sources | (2) Use IF-ELSEIF-ELSE formula in the calculation to map both "US" and "Mainland China" between 2 data sources | (3) In the actual Tableau workbook, both United States⟷USA and China⟷Mainland China are mapped successfully
Illustration by Author | (1) On the data source page, select [Create Join Calculation] between the 2 different data sources | (2) Use IF-ELSEIF-ELSE formula in the calculation to map both "US" and "Mainland China" between 2 data sources | (3) In the actual Tableau workbook, both United States⟷USA and China⟷Mainland China are mapped successfully

With the above implementation, the actual data sources need not be modified but still be mapped as required.

5. Using Superscript & Subscript in Displays

While there is no in-built functionality in Tableau to render Superscript or Subscript, it does however support the display of ASCII characters which include both Superscript and Subscript numerical symbols.

Image by Author | 1 of my past Tableau dashboards currently deployed at Tableau Public | The red outlines refer to the usage of Superscript notation for footnote references
Image by Author | 1 of my past Tableau dashboards currently deployed at Tableau Public | The red outlines refer to the usage of Superscript notation for footnote references

To make life easier for fellow Tableau users, feel free to retrieve a JavaScript tool I have created at at my GitHub if you wish to implement Superscript and Subscript notations into your dashboards. Just double-click it and run it in any JavaScript enabled browser (Chrome, Edge).

Screenshot by Author | Proceed to input the characters which require conversion into the respective text fields and select the button [Convert] as illustrated above | Thereafter just copy and paste the symbols into Tableau
Screenshot by Author | Proceed to input the characters which require conversion into the respective text fields and select the button [Convert] as illustrated above | Thereafter just copy and paste the symbols into Tableau

And this concludes my list of 5 Tableau hackarounds! Hope you have found this useful and please follow me on Medium if you are interested in Data Analytics or other Tableau-related content ❤


👩 ‍💻 Here are some other Tableau Tips & Tricks you may be interested in (the Tableau tools specific each article have been deployed at: Tableau Data Utility Tool):

How to Plot a Custom Map Image on Tableau Dashboard in just 3 Easy Steps – No calculations…

Leverage on D3.js v4 to build a Network Graph for Tableau with ease

Selective Formatting of Numbers in Tableau

Superscript and Subscript in Tableau – Why and How you can implement it

Underrated Combined Functionalities of Tableau – Point, LineString & Polygon Mapping


Related Articles