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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Alex_0201
Post Partisan
Post Partisan

Formula for replacing values

 Hi everyone,

 I'm trying to pull longitude and latitude data from a ship-tracking website and create the "map" visualization based on it:

https://www.myshiptracking.com/vessels/deepsea-yantai-mmsi-311000483-imo-97316383.PNG

 

And it comes in this format after some manipulation with columns:

Capture.PNG

 

Since the coordinates will be changing, I guess I need a formula that will be automatically converting this text into the decimal number (without the deg symbol °) each time I refresh the data. It should look like this I guess:

2.PNG

 

What would the fomula be? And do I replace the text with this formula or do I create a new column?

Thanks in advance 🙂

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

In Power Query, select each column and do a Replace Values to replace your degree symbol with blank. Or, you could do a essentially a Left of length - 1 in a new column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Were you all able to get this working?  I'm doing something similar, and I'm experiencing a weird issue where it seems like ReplaceValue can't find the ° symbol.  I've copied and pasted it exactly like it is in Power Query but it isn't finding this character.

 

Have you all seen anything like this?

Greg_Deckler
Super User
Super User

In Power Query, select each column and do a Replace Values to replace your degree symbol with blank. Or, you could do a essentially a Left of length - 1 in a new column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Thanks, Greg! Would it still work after I refreshed the data?

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors