Forum Discussion
Anonymous
4 years agoNot applicable
Validate 2 columns with same data in different order as equal
I have data with street intersections entered in different fields - Street and Cross Street. I am combining the 2 values in the Intersection1 column using CONCATENATE. See data screenshot
I need a way to say values with the same street names but in different order are the same. For example Main and Hastings is the same intersection as Hastings and Main. Is there an easy way to do this?
- Anonymous4 years ago
This works exactly as required, thank you!
2 Replies
- AnonymousNot applicable
Hey Anonymous , one approach might be to just sort the two streets in a predictable fashion (alphabetically) on each entry, so that even if the streets are reversed they are still sorted into a consistent order.
Here's an example of what I mean:Intersection = Var _FirstStreet = MIN(Intersections[Street], Intersections[Cross Street]) VAR _SecondStreet = MAX(Intersections[Street], Intersections[Cross Street]) Return _FirstStreet & " " & _SecondStreet- AnonymousNot applicable
This works exactly as required, thank you!