Due to lack of time I didn't automate it completely. Its combination of Manual Steps and Automation(VBA code) which is time consuming as of now. To make it simple for you I converted the whole process into a Single Custom Sql.
This is Input format to tableau.
and this is output format. No manual data preparation needed now. Further you can also change the within distance limit as you want instead of 20.
Hi Ombir Rathee,
thank you for sharing your approach.
I was wondering if there's a solution for the following problem. I have two different tables (preview, there are many thousands of rows), not uploaded in Tableau yet. I would like to get the distance between the coordination of the truck to the closest harbor. I would like to have the same sort of result you shared above, the line showing the distance from destination to origin. Thus, in this case, a line showing the distance from the truck to the closest harbor.
Harbor Latitude Longtitude 1 38,727 -76,541 2 21,339 -157,97 3 47,46 -88,162 Truck Latitude Longtitude 667 38,1 -75 25 38 -73,8 31 44,9 -87,9
How can I get two non matching Tables in a Tableau workbook, but make them work together in the way described above? I would really appreciate your help.
Ombir Rathee This is what I have came up with so far. However, the distance calculation is not working properly. Any advice? And can you explain how I get lines to the closest harbor as you have showed in your earlier messages?
Thank you very much in advance
Can't able to suggest anything without looking at your input data set and workbook. Please attached your input excel sheet and workbook separately.
Unfortunately, I'm not able to upload it. I have tried multiple ways, but it doesn't work. I have tried to upload my file to Tableau Public, but that also didn't work. Are you able to help out based on the screenshots? Thank you again.
When you reply to this post then there is a option at upper right corner to add an attachment. Can't help without looking at workbook.