Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
s--turn
Helper I
Helper I

Filled map and UK Postcode Area - not working (but Postcode District is)

Hello,

 

For context, UK postcodes (e.g. NW2 5ND) can be broken down into different levels of detail.  The Postcode Area is the letter (or letters) at the very start (e.g. NW).  The Postcode District is everything before the space (e.g. NW2).  

 

I have created a column for each person in my data giving their Postcode Area, and another column for Postcode District.

 

I'm trying to create filled maps that are coloured according to the number of people in each Postcode Area, and also maps that do this by Postcode District.

 

Weirdly, Postcode District works abolutely fine, even without me changing the data type to anything special - Power BI immediately recognises it and divides up the map accordingly, and colours it according to the number of people in each Postcode District.  However, it will not do the same with Postcode Area.  Even if I try changing it to various geographic data types, nothing happens.  I have checked the values in the column and they look fine to me; they are all Postcode Areas.

 

Any ideas?  I can't upload my workbook as it's confidential.

 

Thanks!

7 REPLIES 7
JESPI
Regular Visitor

Has anyone got a reference table with a hierarchy already built in? I have got a dataset with post code column but would like to summarise by higher levels like regions/counties or even devolvedadministrations/countries? Any references readily available?

ichavarria
Solution Specialist
Solution Specialist

Hi @s--turn,

 

It seems like Power BI may not be recognizing your Postcode Area column as geographic data. One potential solution could be to try adding a custom geographic hierarchy to your data model that defines the relationship between Postcode Area and other geographic areas, such as counties or regions.

 

To do this, you can go to the "Modeling" tab in the Power BI ribbon and click "New Hierarchy". Then, select your Postcode Area column and choose which other geographic columns you want to group it with (e.g. county, region, etc.). Once you have created the hierarchy, you can use it to create your filled maps and color them according to the number of people in each Postcode Area.

 

If this doesn't work, it could be worth checking if there are any formatting differences between your Postcode Area and Postcode District columns. For example, if one is formatted as text and the other as a number, this could cause issues with Power BI recognizing them as geographic data.

 

Best regards, 

Isaac Chavarria

If this post helps, then please consider Accept it as the solution and give Kudos to help the other members find it more quickly.

Hi @ichavarria , thank you so much for your response. Unfortunately, I haven't had any luck with it.  Both fields were formatted as text, so that's not the cause.  I tried creating a hierarchy, putting Postcode Area under Country (since I've noticed it does occasionally pick up regions in other countries, where they coincidentally have the same abbreviation as a Postcode Area), but this didn't work for me either - if I left Country in, it just shaded the entire United Kingdom, and if I deleted Country, it still didn't recognise any Postcode Areas (in this example, I would expect it to shade certain areas in Scotland, as the visual is filtered on people who belong to one of our Scottish groups) - see screenshots below:

sturn_1-1678875110021.png

 

sturn_0-1678875007091.png

 

I have this very same problem today and for the life of me I cannot work out the problem.

Did you have any success in fixing this?

The data is text, column set as geo address, and I've ensured there is no spaces before or after. I've disabled suspected features that have previously caused similar issues in the past.

Hi @d42UK , in the end I think I just had to use an Arc GIS visual instead of the native Power BI one. Weird and annoying!

Thanks @s--turn . I managed to get something working last night by creating a full address column to get something to work.

 

Full_Address = if(len('Table'[BillingStreet]) > 1,'Table'[BillingStreet]&", ","") & if(len('Table'[BillingCity])>1,'Table'[BillingCity]&", ","") & if(len('Table'[BillingState]),'Table'[BillingState]&", ","") &'Table'[BillingPostalCode] &", " &'Table'[BillingCountry]

 

hopefully this helps others.

 

JESPI
Regular Visitor

How did creating a "Full Address" column helped? Did you have to format it as Geographic data? I was tempted to try ArcGIS Maps visual but because of its data sharing policy, I am not able to proceed, are ther any work arounds for using ArcGIS without sharing data? or any other solutions?

JESPI_0-1699965220781.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.