The Distance computed column calculates the distance between two locations.
In the Data Editor, open the table you want to edit.
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.
Name the column.
For Type, search for Distance or navigate to Computed → Distance.
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.
In the Unit field, select whether to display the distance in kilometers or miles.
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.
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.