Question

Location Filter 'within XX miles' appears to break in Maps v3.34

  • 24 November 2015
  • 1 reply
  • 63 views

I have dimensions defined below but using the filters as defined in the looker documentation for ‘within 40 miles of 35.00,-85.00’ fails to generate the where clause in the SQL. The 'inside box (x,y) to (x0, y0) does work.


The error is



A LookML model issue prevented this query from running.

Invalid location filter string: within 30 miles 50.33, -90.14



- dimension: latitude
type: string
sql: ${TABLE}.latitude

- dimension: longitude
type: string
sql: ${TABLE}.longitude

- dimension: address_location
type: location

sql_latitude: ${latitude}
sql_longitude: ${longitude}

SELECT
CASE WHEN dimaddress.latitude IS NOT NULL AND dimaddress.longitude IS NOT NULL THEN (
COALESCE(CAST(dimaddress.latitude AS VARCHAR),'') || ',' ||
COALESCE(CAST(dimaddress.longitude AS VARCHAR),'')) ELSE NULL END AS "dimaddress.address_location",
COUNT(DISTINCT factuccequip.buyersk) AS "factuccequip.distinct_buyers"
FROM public.factuccequip AS factuccequip
INNER JOIN public.dadataaccessfact AS dadataaccessfact ON dadataaccessfact.factid = factuccequip.id
INNER JOIN public.dimaddress AS dimaddress ON dimaddress.buyersk = factuccequip.buyersk

WHERE
FAIL AND (dimaddress.addressposition = 1) AND (dadataaccessfact.daid = 1222)
GROUP BY 1
ORDER BY 2 DESC
LIMIT 500

1 reply

Thanks for the quick response. That worked! 😀

Reply