Advance with Assist shares quick solutions to common challenges encountered by the InterWorks Assist on-demand team.
One of the top questions we see in Assist involves mapping paths from an origin to a destination. Maybe this is shipping information from a warehouse to the delivery address or flights from takeoff to landing. The ability to create this in Tableau has always been there, but it just received a nice enhancement that we wanted to make sure you are aware of.
Mapping the Path from Origin to Destination
Prior to 2019.2, in order to draw a path, you likely had to set up two data records: one for the origin and one for the destination record. The unique path between the two marks would be the key to connecting the two latitude and longitude map marks.
Here’s an example flying from Tulsa International to O’Hare in Chicago:
With the release of 2019.2, you now have functions available to create this path: MAKELINE and MAKEPOINT.
New Mapping Functions in Tableau 2019.2
This new feature has been needed by many users, as the Origin and Destination records often have their own distinct Latitude and Longitude columns—this is how I typically see the setup actually. However, now, the new calculation to create the path would look like this:
When you add this to your Marks card, the COLLECT aggregation appears, and the line is drawn as desired: