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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
KathleenW
Regular Visitor

Removing code around text in a table

I am getting this code around text in a table that is being imported from the data source. Is it possible to automatically get rid of it through PowerBI? Thanks!

 

<div data-wrapper="true" style="font-family:'Segoe UI','Helvetica Neue',sans-serif; font-size:9pt">
<div>This is a test note</div>
</div>

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@KathleenW , refer if this blog can help

https://www.c-sharpcorner.com/article/convert-data-from-html-to-plain-text-in-power-bi/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-eqin-msft
Community Support
Community Support

Hi @KathleenW ,

 

As @amitchandak suggested, you could go to Power Query Editor, Add a custom column,then expand it.

= Html.Table([ColumnName] , {{"text",":root"}})  

 

Below is the whole M syntax:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("XY5BC8IwDIX/SujZ4dCDOPGuFy/qad0hbKkWaluabDJ/vdPKDkIgfMl7L6lrpfuyXLedHaBDweKZMEZKe60k9aQVsIyOJjTBS2HwYd1YfTyrzZlugeB6zLTI7UBuILEtwokmf14xei6YkjU7+OawfVG1jaLzeZqfyHi5W4apEIRYwAf5KZazRPv/iWqaNw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Html.Table([Column1] , {{"text",":root"}})),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"text"}, {"text"})
in
    #"Expanded Custom"

Output:

Eyelyn9_0-1645165487284.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @KathleenW ,

 

As @amitchandak suggested, you could go to Power Query Editor, Add a custom column,then expand it.

= Html.Table([ColumnName] , {{"text",":root"}})  

 

Below is the whole M syntax:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("XY5BC8IwDIX/SujZ4dCDOPGuFy/qad0hbKkWaluabDJ/vdPKDkIgfMl7L6lrpfuyXLedHaBDweKZMEZKe60k9aQVsIyOJjTBS2HwYd1YfTyrzZlugeB6zLTI7UBuILEtwokmf14xei6YkjU7+OawfVG1jaLzeZqfyHi5W4apEIRYwAf5KZazRPv/iWqaNw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Html.Table([Column1] , {{"text",":root"}})),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"text"}, {"text"})
in
    #"Expanded Custom"

Output:

Eyelyn9_0-1645165487284.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@KathleenW , refer if this blog can help

https://www.c-sharpcorner.com/article/convert-data-from-html-to-plain-text-in-power-bi/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors