Forum Discussion

PowerBiKing's avatar
PowerBiKing
Frequent Visitor
3 years ago
Solved

Trying to link two different postcode columns to lookup table

Hi,   I work in the higher education sector and I'm trying to perform a geographical region analysis for both university applicants and the school they are currently at.   I have an 'Applications...
  • PowerBiKing's avatar
    PowerBiKing
    3 years ago

    I've been able to get to a solution that seems to work.

     

    This way I created a custom applications measure using INTERSECT (syntax below). The Applications and Postcode tables are linked on the School postcode in the data model, so I can use this measure in the report that describes applications by region based on Student postcodes.

     

    Applications (Student Postcode) =
    CALCULATE(
        SUM([Applications],
        ALL('ApplicationsTable'[Student Post Code]),
        INTERSECT(
            VALUES('ApplicationsTable[Student Post Code]),VALUES('PostCodeLookupTable'[Post Code]))
    )