Forum Discussion
masplin
8 years agoImpactful Individual
Mapping postcode to Easting/Northing set
I have a set of temprature data that is displayed in a regular grid for example a point is Easting 102500 Northing 587500. I want to work out what is the nearest postcode district to this point so i ...
masplin
8 years agoImpactful Individual
Problem is its TOPN of a function across a whole table. I've tried using SUMMARIZE to create a table and apply my formula but doesn't work.
masplin
8 years agoImpactful Individual
I've made a small amount of progress. This calcuated column correctly calcuates the smallest vlaue of my error term for each location in my original data set
=CALCULATE(
MINX(
SUMMARIZE(
Postcode_District,
Postcode_District[Postcode],
Postcode_District[Easting],
Postcode_District[Northing]
),
(('Daily Time Series data'[Average of Easting]-Postcode_District[Easting])^2)+(('Daily Time Series data'[Average of Northing]-Postcode_District[Northing])^2)
)
) Now I need to identify the row in my Postcode_District table that contained the easting/nohing combination that matches this number and retrun the Postcode_District[Postocde] value?
I tried this (without really understanding the syntax) and got a circular error.
=CALCULATE(
VALUES(Postcode_District[Postcode]),
TOPN(
1,
SUMMARIZE(
Postcode_District,
Postcode_District[Postcode],
Postcode_District[Easting],
Postcode_District[Northing]
),
(('Daily Time Series data'[Average of Easting]-Postcode_District[Easting])^2)+(('Daily Time Series data'[Average of Northing]-Postcode_District[Northing])^2),
ASC
)
)