6 Replies Latest reply on May 13, 2016 12:05 AM by Pravin Gondhale

# Distance and density estimation

I have a list of coffee stores of four different coffee chain in UK with Lat and Long details.

I need to find out how many stores fall within certain distance of each other. Distance filed should be dynamic say 2 miles, 5 miles, 10 miles etc.

How can I do that?

I am pretty new to tableau. Data is in excel. I do not have SQL etc. databases and read on some forums certain distance functions etc. do not work with excel.

• ###### 1. Re: Distance and density estimation

Hi Pravin,

You can go through this link for more details  Calculating Distance | Tableau Software

Thanks and regards,

Rohan Malusare.

• ###### 2. Re: Distance and density estimation

Hi Rohan,

Thanks for this but I am not sure if that works for me.

I do not intend to calculate distance between two shops. I want to count number of stores which are within specific distance (say 2 miles) of each other.

Pravin

• ###### 3. Re: Distance and density estimation

Mahfooj Khan and Tharashasank Davuluru please can you help on this thread.

Regards,

Rohan Malusare.

• ###### 4. Re: Distance and density estimation

HI Mr. Pravin Gondhale ,Mr.Rohan Malusare

Check the first it exactly fits to your requirement;

1 of 1 people found this helpful
• ###### 5. Re: Distance and density estimation

Thanks for the help.

First tutorial Customers within N miles radius analysis using Tableau helped a great deal and exactly this is what I was looking for.

I am using Tableau 8.2 and I have set up the maps but facing trouble to sum up results in a table.

The table I am looking forward to simply has Region and Number of Customers as columns. So each region names shows numbers of customers falling within N miles of stores in that region.

In rows basically I plan to show radius we chose. (Variable 'N') in this case.

Can you help me with the table?

• ###### 6. Re: Distance and density estimation

Ok I found it. Below formula works best.

IF FIRST()==0 THEN

WINDOW_SUM(SUM(IF [Sales at STORE Level] >= 0 THEN 1 ELSE 0 END))

END