I have 2 tables. The first "Mot Centres" contains a list of UK garages each with an Easting and Northing for their location. The 2nd table is a list of traffic flow on various roads again each with a check point location in Eastings and northings. I want to work out which road check point is nearest to each garage. In my head the calculation is simple, but no idea if DAX can handle it
1. calculate the distance between Garage 1 and all road check points using pythagoras )((Easting MOT-Easting CP)^2)-((Northing MOT-Northing CP)^2))^0.5.
2. Then on the row for the Garage 1 return the minimum value of this. So essentially I need to create a column for each garage of all the distance and then apply a MIN calculation.
3. Then I need to use this min value to somehow filter the CP table to return the CP ID.
Is this just way out of PP depth as the 2 tables are 22,000 row and 26,000 rows so that is a pretty big matrix!!!!!
Thanks for any advice as to whether i'm barking up the wrong tree.
Mike
1. calculate the distance between Garage 1 and all road check points using pythagoras )((Easting MOT-Easting CP)^2)-((Northing MOT-Northing CP)^2))^0.5.
2. Then on the row for the Garage 1 return the minimum value of this. So essentially I need to create a column for each garage of all the distance and then apply a MIN calculation.
3. Then I need to use this min value to somehow filter the CP table to return the CP ID.
Is this just way out of PP depth as the 2 tables are 22,000 row and 26,000 rows so that is a pretty big matrix!!!!!
Thanks for any advice as to whether i'm barking up the wrong tree.
Mike