Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello All,
I have a column that is in HTML format. I would like to keep the column as HTML and display HTML in my report. But I have additional characters "&?". I want to remove this additional column from the HTML value.
I am trying this function to remove the additional characters -
(HTML as text) =>
let
Source = Text.From(HTML),
SplitAny = Text.SplitAny(Source,"amp;?"),
ListAlternate = List.Alternate(SplitAny,1,1,1),
ListSelect = List.Select(ListAlternate, each _<>"&"),
TextCombine = Text.Combine(ListSelect, " ")
in
TextCombineI am using this function in my actual table
#"HTML Cleanup" = Table.AddColumn(#"Promoted Headers", "NewColumn", each
if [ExistingColumn] = null
then null
else #"HTML Cleaner"([ExistingColumn]))The additional character is showing up in a link -
https://abc.com/a/sr/attach/rkm/3023/23378?server=xyz&?timestamp=1585154001466
Can you provide any help in modifying the query or any other suggestion of how can I achieve this?
Solved! Go to Solution.
Made following change in the script and it worked.
(HTML as text) =>
let
Source = Text.From(HTML),
SplitAny = Text.Split(Source,"amp;?"),
ListAlternate = List.Alternate(SplitAny,1,1,1),
ListSelect = List.Select(ListAlternate, each _<>"&"),
TextCombine = Text.Combine(ListSelect, " ")
in
TextCombine
Made following change in the script and it worked.
(HTML as text) =>
let
Source = Text.From(HTML),
SplitAny = Text.Split(Source,"amp;?"),
ListAlternate = List.Alternate(SplitAny,1,1,1),
ListSelect = List.Select(ListAlternate, each _<>"&"),
TextCombine = Text.Combine(ListSelect, " ")
in
TextCombine
@Anonymous hello I found the sample query in one of the posts. Would you be able to help me out?
Hi @Anonymous ,
Would you please try to use the following m-query?
(HTML as text) =>
let
Source = Text.From(HTML),
SplitAny = Text.SplitAny(Source,"<>"),
ListAlternate = List.Alternate(SplitAny,1,1,1),
ListSelect = List.Select(ListAlternate, each _<>""),
TextCombine = Text.Combine(ListSelect, "")
in
TextCombine
Please refer to the similiar post: https://social.technet.microsoft.com/Forums/office/en-US/b080d122-14f0-43bc-8a86-f50cdf1c32d8/removing-html-tags-when-source-is-sharepoint-list?forum=powerquery
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |