This short blog will describe how you can add a link to your Tableau tooltips that, when clicked, will open a new browser tab and open Google Maps at the location specified by the latitude and longitude values of the mark for the tooltip that was clicked on.
To keep this brief, I’ll assume you are familiar with Tableau dashboard actions. If this is not the case, please read this Tableau help page for background information.
For this technique to work, you need to have Latitude and Longitude values in your data as they will be used in the URL that is passed to Google Maps.
Create a URL Calculation
Create the following calculation:
Below is the code to copy:
"https://www.google.com/maps/search/?api=1&query=" + STR([Latitude]) +","+ STR([Longitude])
Add the URL Calculation to the View
For the URL calculation to be available for the URL action, it must first be added to the view, so add the calculated field to the Detail shelf
Create URL Dashboard Action
Finally, we can create the URL action, which will show the link in the tooltip. On the dashboard, go to Dashboard > Actions and the click the Add Action button and select Go to URL…
Set the action up as shown below.
To add the Google Maps URL field to the action, click the right arrow button to the right of the URL field and select the calculation from the list of fields.
The Name of the action is the text that will appear in the tooltip, so you want this to be descriptive and tell the consumer what will happen when they click the link.
You may have noticed I have a link symbol at the start of the Name. This is a unicode symbol: 🔗 which you can copy and paste in.
Thanks for reading!
Latest YouTube video: 2 minute overview of this new 2022.3 feature and examples use cases