Skip to Content
avatar image
Former Member

Function distance ?

Hello,

I would like to calculate the distance between 2 GPS coordinates. So, I would like create a new column containing a function. Can you help me please ?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 18, 2017 at 01:27 PM

    Have you tried looking at the tutorials? See YouTube list: https://www.youtube.com/results?search_query=SAP+analytics+cloud+%22calculation%22

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2017 at 05:28 PM

    Lucile,

    I am not sure how you want to use the distance result but I would suggest you have 2 approaches. One is to pre calculate the distance from Agencie to the Cities, then add a property to that dimension which stores the difference, but is reportable as an attribute. The other approach involves adding Latitude and Longitude as accounts. Add an account called Distance to Agencie. Then using either model account calculation logic or story calculation logic to derive the distance as a measure/account. I don't know the formula to build the distance calculation, but assume it may be quite involved.

    Hope this helps.

    Petar

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your answer. But I will explain to you my need.

      I have an agency (which is my referency place) : Paris (with its GPS coordinates)

      And I have others agencies in France : Lyon, Grenoble, Strasbourg, Marseille . These cities have also GPS coordinates.

      I would like to put all these cities in a map, and to put the cities which have a maximal distance of 200 km with the agency of Paris (referency) in green, and the others in red.

      Thanks

  • Feb 14 at 06:10 PM

    Hi Lucile,

    Were you able to figure this out?

    You could try having all the locations as a red Point of Interest (POI) layer, then the ones within 200km as a separate green bubble layer over the POI. Could resize the bubbles so that they cover/hide the POI icon. To get the ones that are 200km on the bubble layer, you can set a static map distance filter (no input control) on the geomap, it won’t filter out the POI so don’t have to worry about that.

    Disadvantage here is that you won’t be able to put measures on a POI.

    Add comment
    10|10000 characters needed characters exceeded