1 Reply Latest reply on Feb 13, 2020 7:47 PM by Zhouyi Zhang

    Calculate distance in KM between two postcodes

    Alex Robinson

      Help please. Does anyone know how to calculate the distance (in KM) between two postcodes (ideally using the postcodes) or between the lat & long of two postcodes?


      The attached workbook contains sample data for:

      1. customer postcodes and the postcode coordinates
      2. station postcodes and the postcode coordinates.


      My original data set only has postcodes (hence why I'd rather just use postcodes) so I’ve linked the postcode coordinates in from an alternate source I’ve found online.


      Ultimately what I require is a calculated cell that calculates the number of km's between the customer's postcode and station’s postcode.

      Each row represents a unique customer transaction for which I’d require the distance for each. The KM results will then be used to assign risk ratings i.e. if greater than 10km do 'x' else 'y'.


      Any guidance would be greatly appreciated as Tableau is new to me and my knowledge is limited.