2 Replies Latest reply on May 28, 2013 12:53 PM by Allan Walker

    Calculating the end-to-end distance between several points across several groups

    Christine Holloway

      Hello,

       

      I've run into several problems trying to use the calculate distance formulas to determine the end to end distances between several points in groups. I have mapped, using a spreadsheet with latitude and longitude (not generated by Tableau), every location and I have assigned each group of locations a unique ID.

       

      I need to calculate the distance from end to end and have had no luck using the existing knowledge base information on calculating distance between points.

       

      As you can see from the screen captures below, the formula matches the Great Circle formula given in the Calculating Distance knowledge base. However, I was not able to inner join the table to another instance of it (unless that means to just make a copy of the worksheet in Excel and connect them together, which is what I did). I am not sure if that skews the calculations, but my guess is that my SQL is not pulling the correct latitude and longitude from adjacent points into the formula.

       

      The number on the top (at each point) is the location ID and the number on the bottom should be the calculated distance.

       

       

      Capture_1.PNG

       

      Capture_2.PNG