![]() So in this exmaple we can see it saying closest store to A05400 is 145.6 miles and that house ref is R15700. Now its returning the odd few, stradorically but not sure on the validity of the closest house as i can see with some filters its a bit random. Now this formula before just returned every MEMNO the same as the MEMNO we were looking up the closest value for, which was expected as before the distance was Zero. So along with the Closest House (Miles) columns now using the formula you provided below i have this Closest House column which is returning the refference for this closest point so there is some usable context Ĭlosest House = CALCULATE(MAX('Route Information (Dup'')'), Not sure on whether its accurate though in its calculation ![]() Okdokie we are making some progress no 0 values like before, thanks Dedelman! Basically I added the MAX at the top, removed the duplicate table, and moved the filter into each call to 'Route Information', and wrapped ALL() around the table so it will iterate over the entire table regardless of which point is selected. I tested on some Lat-Long data that I had and it definitely changes values (that are not 0) when I click on a spot on a map (I can't vouch for the formula's accuracy, but at least it changes). ![]() 'Route Information' _ThisHOUSE //moving this up to the table on MINX and adding ALL * SIN ( ( ClostestHOUSELongitude - HOUSELongitude ) * P2 ) ^ 2 SIN ( ( ClostestHOUSELatitude - HOUSELatitude ) * P2 ) ^ 2 VAR ClostestHOUSELongitude = 'Route Information' VAR ClostestHOUSELatitude = 'Route Information' SELECTEDVALUE ( 'Route Information' )įILTER(ALL('Route Information'), 'Route Information' _ThisHOUSE), //Note the use of FILTER VAR HOUSELongitude = MAX('Route Information') VAR HOUSELatitude = MAX('Route Information') You should be able to do the calculation against a single instance of 'Route Information'. IF ( _DistanceFromCurrentRough 0, _DistanceFromCurrentRough )Īs you can see, on 1/18/18, the distance is different for M49418 ![]() VAR CinemaLongitude = 'Route Information'Ĩ0 * SQRT ( POWER ( ( HouseLatitude - CinemaLatitude ), 2 ) + POWER ( ( HouseLongitude - CinemaLongitude ), 2 ) First, I recreated 'Route Information' to have 5 dates' worth of data, one date of which is missing 3 of the locations (Dt is literally just a list of 5 dates 1/14 - 1/18): (Example: port~1 matches fort, post, or potr, and other instances where one correction leads to a match.OK, I took code last post and turned it into a measure.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |