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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
jaharris91
New Member

Extracting state and country from unstructured address field

I have a data source that is pulling in address information in a single column and there isn't any structure to how that information is input (see example)

 

Speech Address
Raleigh, NC Convention Center
3799 Las Vegas Blvd, Las Vegas NV 89109
Long Beach, CA
Virtual
Waldorf Astoria DC (1100 Pennsylvania Avenue NW, Washington DC 20004)
Fira de Barcelona
Brussels Belgium
Javits Center

 

I need a column for a graphic that is parsing out City/State for inside the US and City/Country information for outside the US. (example below). Is there any way to accomplish this in Power Query?

 

Speech AddressState/Country
Raleigh, NC Convention CenterRaleigh, North Carolina
3799 Las Vegas Blvd, Las Vegas NV 89109Las Vegas, Nevada
Long Beach, CALong Beach, California
Virtual 
Waldorf Astoria DC (1100 Pennsylvania Avenue NW, Washington DC 20004)Washington, DC, United States
Fira de BarcelonaBarcelona, Spain
Brussels BelgiumBrussels, Belgium
Javits CenterNew York, New York
1 REPLY 1
lbendlin
Super User
Super User

You can run Python and R scripts in Power Query. They need to result in a dataframe, and they require the use of a personal gateway.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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