7 Replies Latest reply on Oct 9, 2018 5:34 AM by Julianne Hergenroder

    New Custom SQL

    Julianne Hergenroder

      When using the code to measure the distance between Lat/Long (I.e.)

       

      ACOS((SIN(RADIANS(LOOKUP(AVG([Lat]), First())))
      * SIN(RADIANS(AVG([Lat]))) + COS(RADIANS(LOOKUP(AVG([Lat]), First()))) * COS(RADIANS(AVG([Lat]))) *
      COS(RADIANS(AVG([Long])) - RADIANS(LOOKUP(AVG([Long]), First()))) ))*3959

       

      Does everyone import their data from excel? We create tables in PostSQL and import them into Tableau and for some reason I cannot seem to get this code to work regardless of how I manipulate the code or data, giving me the error:

      (ERROR: syntax error at or near "["; Error while executing the query) every time.

       

      Thanks,

      Juli