Calculate the Distance Between Two Geometry Data Types
You can use the function GeometryDistance() to calculate the distance between two shapes.
If your data holds two geometry columns in different datasets, then this function requires you to properly join the two datasets so that all geometry records inter-relate (mimicking a spatial join). It’s advisable to establish the join while you prepare and create the dataset, and avoid blending the columns within the workbook canvas as an ad hoc mashup. It’s critical that you always consume these joins with some filter value on one side of the join. Either design the dataset with an embedded filter value, or design the canvas with an explicit filter value when using these in advanced geometry calculations. A good practice is to always filter the values while using calculations like GeometryDistance, GeometryRelate, and GeometryWithinDistance.
Usage: GeometryDistance(geometry_column1,geometry_column2).
This example shows an aggregate function max() applied on the GeometryDistance() calculation.
This example shows a join defined between two different database tables when you create the dataset.

