Forum Discussion
KathleenW
4 years agoRegular 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="f...
- 4 years ago
KathleenW , refer if this blog can help
https://www.c-sharpcorner.com/article/convert-data-from-html-to-plain-text-in-power-bi/
- Anonymous4 years ago
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:
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
4 years agoSuper User
KathleenW , refer if this blog can help
https://www.c-sharpcorner.com/article/convert-data-from-html-to-plain-text-in-power-bi/