Convert UK Postcodes to Postcode Areas

Hello!

I am wanting to visualise sales in the UK on a map. 

Based on documentation, Looker allows for Postcode Areas (e.g., Norwich: “NW”) but not actual postcodes (e.g., NR11AA). Unfortunately, the Shopify data I am working with only has full postcode data. 

So, I am wanting to pull only the postcode area. Tricky thing is, some postcode areas are two letters, others are three. Therefore, can’t use a simple substring($shopify_zip,1,2) table calc.

We’re using a shared data warehouse, so can’t use LookML. Will need to be a table calculation or custom filter.

Could someone please assist with this? 

   

0 4 1,084
4 REPLIES 4
Top Labels in this Space