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.
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?
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.
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:
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.
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.
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?
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.