Dashboard week: calculating distance

by Soha Elghany

Friday marked the last day of dashboard week the dataset was about the locations of the bathrooms in the city of Vancouver, there was a time limit to produce something insightful in a visualisation.

So I went with the idea of calculating the distance between Vancouver city centre and the various locations of bathrooms.

The first step I created a union.

Second type: I took was a created a calculated field for Longitude and Latitude:

So for Latitude:

IF RIGHT([Table Name], 1) =’1′ THEN 49.246292
ELSE [Latitude] END

for Longitude:

IF RIGHT([Table Name], 1) =’1′ THEN -123.116226
ELSE [Longitude] END

This gave me the coordinates for Vancouver city centre

To calculate distance I used this article: here

3959 * ACOS
SIN(RADIANS([lat])) * SIN(RADIANS(49.246292)) +
COS(RADIANS([lat])) * COS(RADIANS(49.246292)) * COS(RADIANS(-123.116226) – RADIANS([long]))

click here to view the data visualisation

Tips for the Tableau Desktop Qualified Associate exam!

3 mins read

Sat 25 Aug 2018

How to visualise missing dates? #tableautip

1 mins read

Tue 21 Aug 2018

Dashboard week: knowledge is key

2 mins read

Fri 17 Aug 2018

Dashboard week: finding a story

1 mins read

Wed 15 Aug 2018