1 Reply Latest reply on Jun 18, 2018 8:19 PM by swaroop.gantela

Calculating Distance from Individual Addresses to Multiple Zip Codes Incorrectly Filtering

Hello,

I'm using Desktop v10. I'm trying to calculate the distance for each zip codes from multiple individual address. Specifically, I am trying to answer how many zip codes fall within X miles of a particular store. I am using Lat/Long of the store addresses and the zip codes to calculate the distance between the two points.

The error I am experiencing is that each unique store address is only calculating the distance between it (the store address) and the zip code it lies within. For example, store ABC at 123 Main Street, Chicago, 10001 is only calculating it's distance to zip 10001. I would like it to calculate it's distance relative to all of the other zips within the Chicago metro area. My table (as pictured) should be completely filled with values.

I have attached the workbook. So far my process for calculating distance has been as follows:

LOD LAT STORE == {FIXED [Address]:MIN([Latitude])}

LOD LONG STORE == {FIXED [Address]:MIN([Longitude])}

LOD LAT ZIP == {FIXED [Zip]:MIN([LAT])}

LOD LONG ZIP == {FIXED [Zip]:MIN([Long])}

3959 * ACOS

(

)

Any help is very appreciated. Thank you!

• 1. Re: Calculating Distance from Individual Addresses to Multiple Zip Codes Incorrectly Filtering

Grant,

Please see if the workbook v10.2 attached in the Forum Thread is closer to the goal.

I think it was mostly there.

On the Data Source page, I joined the two sheets on a calculated field of 1.

This created all of the combinations, which was then filtered down using

a distance parameter:

[Distance (in Miles)]< [Distance Parameter]

On the Dashboard, I added a dashboard action to show just the near zips

when clicking on a store's dot, and I filtered a table to show the list of zips

within the Parameter range.