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:
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.
Hi, Alex
Not sure which version of tableau you are using, a latter version of tableau provides a function to calculate the distance of two points
https://tableaumagic.com/tableau-2019-3-distance-function/
Or you can calculate by your own as below link shows
Tableau Tip: Calculating the distance between two points
Hope this helps
ZZ
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.