Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi all,
I am cleaning HTML text. So far I have been able to clean most of it. However, I am not able to clean this string "target="_blank"/a." I get some rows that look like: "target="_blank"/ahttp://www.youtube.com" I would like to remove this part "target="_blank"/a"and keep "http://www.youtube.com".
The code I have so far is this and it works well:
= (HTML as any) =>
let
Source = if HTML = null then
""
else
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
Thank you in advance
hi, @joansinho
You could try to refer to these articles:
Best Regards,
Lin
Thank you @v-lili6-msft!
I have used the websites you recommended to be able to use the code I posted above. I have not been able to figure out how to add a line to remove the part I mentioned. It should be something like
If( table) contains "target="_blank"/a ", remove "target="_blank"/a" and keep the rest of the string.
"target="_blank"/ahttp://www.youtube.com"
Remove = "target="_blank"/a "
Keep = "http://www.youtube.com"
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 37 | |
| 28 | |
| 27 |