Distance

Calculate the distance between two locations.

The Distance computed column calculates the distance between two locations.

Adding and Configuring a Distance Column

Creating a Distance Column

  1. In the Data Editor, open the table you want to edit.

  2. Add a new column by clicking the plus (+) symbol to the right of the table

    • New columns added with the plus button will always appear on the right of the table. If you'd like to add a column somewhere else in your data, you can select the dropdown menu on an existing column and choose Add column right. You can also click and drag columns to rearrange them.

  3. Name the column.

  4. For Type, search for Distance or navigate to Computed → Distance.

  5. The From and To fields contain the locations between which you want to calculate the distance. One of the values needs to be from a column in your table. This can be an address or latitude/longitude pair. The second can be another location in your table, or the device's current location.

    • When you choose Current Location in the To column, Glide will ask to know the user's location. This is because Glide needs the user's browser's location in order to make a calculation.

    • The calculation will be specific to each device, so each user will see their own value based on their own location and distance to the address you specify.

  6. In the Unit field, select whether to display the distance in kilometers or miles.

  7. You can change the Precision of the calculation and only show the rounded distance, or you can show the distance with up to 4 decimal places.

  8. The calculation of distance is in kilometers and the column defaults to showing the Units after the calculation, e.g. 8,469 km. You can change the units label and/or move it to before the calculation.

Have a question about Distance? Ask the Glide community.

Updated more than a week ago
Was this article helpful?