XY Distance

Hi,
I’m having difficulty getting Distance() to work with coordinates from two fields with the XY type. When I make two virtual columns that take these same fields and make them LatLong type, distance() functions. Can Distance() only be used with Lat/Long? Any advice? thanks!

Solved Solved
0 14 492
1 ACCEPTED SOLUTION

Thanks, I made a work around for myself. I make two virtual columns called [Location 1 X] and [Location 1 Y] and then use the expressions Lat([location 1]) and Long([Location 1]). Then I do the same for my other location [Location 2]. Then (Since I was trying to make an expression where objects wouldn’t appear if their location was too far apart, I made an expression more like
Not(
Or(
OR(
([Location 1 X]-[Location 2 X))>5
,
([Location 1 X]-[Location 2 X))<-5
)
,
OR(
([Location 1 Y]-[Location 2 Y))>5
,
([Location 1 Y]-[Location 2 Y))<-5
)
)
)

View solution in original post

14 REPLIES 14
Top Labels in this Space