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
Anonymous
Not applicable

Filled maps, US counties, and Louisiana

Hi all,

 

This is a post to demonstrate an interesting nuance I found when mapping US counties.

 

The problem I was facing was that some counties were not getting mapped correctly by the Power BI visual: Filled map OR by Arcgis maps. I then found from the forums the best format for my county column:

 

"<County>, County, <State Code>"

With this format the filled map managed to place NEARLY every county in the USA. Unfortunately, I was still having real trouble with Louisiana. Not only were some of the Louisiana Counties not being mapped but worse still they were being allocated to the wrong state, e.g. "Lafayette, County, LA" was being plotted in the middle of Georgia! Nightmare.

 

After some investigation I found something interesting. Louisiana was controlled by France and Spain during it's infancy and was in both circumstances was a roman catholic state. As such the subdivisions of the state were not counties but instead Parishes. And this has never changed so today, Louisiana is the only state to not have Counties but to have Parishes... therefore:

IF( State code = "LA",
     "<County>, Parish, <State Code>",
     "<County>, County, <State Code>"
)

 

And all of a sudden it works perfectly! Louisiana is nicely filled in.

 

Hope this helps some people, certainly stumped me for a while.

 

Will

 

TL;DR

 

Mapping counties in the US requires this format for bing maps:

"<County>, County, <State Code>"

 

BUT Louisiana doesn't have counties, it has Parishes so for Louisiana you need:

"<County>, Parish, <State Code>" 

7 REPLIES 7
pbiwizard
Frequent Visitor

Hi! Would you be able to share is this is a new column or a measure? I am having trouble with this same issue. I am fairly new to PBI and am unsure what the "<" symbols and what the formula you made means. Thanks! 

TomMartens
Super User
Super User

Hey,

I just put this little piece of information to my mapping onenote page, and will hopefully never forget this information.

 

But I'm wondering why you have a column called Parishes in your table and what are the values for this column and do they make sense.

 

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi do you think you could explain the solution the user above mentioned? Thanks! Having the same issue with Louisiana parishes. 

Hey @pbiwizard ,

 

my understanding back then was, that a column needs a proper value like this one
"Lafayette, County, LA"
using a Power Query function the value above was transformed to 
"Lafayette, Parisch, LA"

This with assigning the correct data category to the column,

image.png
will avoid (most probably) weird data visualizations:

Hopefully, this adds some explanation, and helps to tackle your challenge.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

This worked amazing! All of the parishes are now showing up on the map correctly! 

😉 Perfect!



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi, my data is on buildings in the US and for one particular visual I want to sum them up to state and county level, e.g. total value of buildings in Washington or Total value in Lafayette county Louisiana.

Fortunately each building comes with its respective state and county and all i needed to do was get bing to understand what county i was referring to for each building. The logic I showed in the original post was how I achieved this. 

 

Thanks for your reply,

 

Will

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.