How to calculate radius (in miles)

We have two database fields called "Longitude" and "Latitude". We are a website company and hence we have those fields in our database. I have to calculate as how many customers are there within the specified radius (in miles) of several cities.

I suppose you want report as Number of customers by City and radius as filter=2E

Create a metric Radius for which the formula would be Sqrt((Cust_LT_N - City_LT_N)^2 + (Cust_LD_E - City_LD_E)^2)

Create a filter (set qualification, metric value) based on above created Radius metric=2E Set qualifier as 'Less than or equal to' and set it to value prompt=2E Use this filter in report=2E

The problem is calculation of Cust_LT_N, Cust_LD_N,City=2E=2E=2E=2E The latitude and longitudes are spherical co-ordinates whereas above formula is based on grid co-ordinates=2E Conversion of spherical to grid is very complex process and its implementation in MSTR would not be feasible=2E

In above formula, N stands for northing and E stands for easting=2E Get these values populated at ETL process OR use custom funtion in MSTR to access third party software for conversion=2E