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

Can't remove invisible characters

Hi everyone,

 

I received those data from SQL server. They look normal in SQL but when importing to Power BI, some of them contain invisible characters that I can't remove them. I have tried to trim, substitute, remove white space but they couldn't help. 

 

My wish is to extract only number from those strings.

 

 

I appreciate very much if you can solve this problem.

 

Thank you very much!

Regards,

Cindy

Sample

2 ACCEPTED SOLUTIONS
MarcelBeug
Community Champion
Community Champion

Based on an export from your report data and some investigation, I noticed that your text contains characters:

8236 - large, ocean-going vessel

8237 - left to right override

 

When removing those, you're fine to proceed. Code from the formula bar, with data in Column1 resulting in an additional column with numeric data:

 

= Table.AddColumn(#"Changed Type", "NumericData", each Number.From(Text.Trim([Column1],{Character.FromNumber(8236),Character.FromNumber(8237)})),Int64.Type)
Specializing in Power Query Formula Language (M)

View solution in original post

To my limited DAX knowledge it is not possible in DAX.

The SUBSTITUE function is close, but there is no function in DAX to convert unicodes to characters and I didn't succeed in copy/paste the special characters into the SUBSTITUTE function.

Again, my DAX knowledge is limited.

Specializing in Power Query Formula Language (M)

View solution in original post

10 REPLIES 10

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.