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

convert HTML special characters

Is there an easy way to convert special characters encoded for html to standard characters. I'm receiving characters such as "&lt;" that i want to convert to "<" or "&#233;" that I want to convert to "é".

3 REPLIES 3
ImkeF
Super User
Super User

You'll find some links for html-cleanup here: https://social.technet.microsoft.com/Forums/en-US/afe68023-2d06-4270-ac4d-4416a60fdf49/i-have-a-colu...

 

If you have a custom table of values to replace/translate, this might be better: https://blog.crossjoin.co.uk/2014/06/25/using-list-generate-to-make-multiple-replacements-of-words-i...

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thx for the reply Imke.

 

I found the links above but the first set is not really solving my issue because I don't really need to remove some html tags from a string, my concern is jut for special characters (and don't want to remove them, just to convert them).

 

I know Chris' pattern for this kind of replacement but just wanted to check if someone add a better solution than building a conversion table/function for this specific case. Sounds not, will use this trick but also post an idea for Microsoft to request for a native support of an Html.Decode function.

Hi @Seddryck,

 

In my opinion, programming language is more suitable to deal with these scenario, you can write an api to convert these characters, then use power bi get the result data.

 

I agree with ImkeF's point of view, you can write a custom function to replace the specify of characters.

 

BTW, I haven't found any functions to format special HTML characters. 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.