Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
We have a power app that is now connected to a Power BI report. There is a column that has HTML tags and we would like to remove the <>, </> and tags inbetween the characters. is there a good way to do this? There are a plethora of tags so we cant hard code just need the tags completely removed. Below is an example. Thanks.
<p>Compliance for report</p>
Solved! Go to Solution.
Parse the HTML and ask Power Query to return only the payload text.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
@common763 As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?
@Omid_Motamedise, @ronrsnfld, @lbendlin, Thanks all for your promt response here.
Thanks,
Prashanth Are
MS Fabric community support
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query
Thanks for all of your help. I ended up resolving this inside Power Query. There is a link below that is a little dated but explains the process. This removed the HTML tags and didnt need any expressions.
Using Power BI to Report on Rich Text Data Fields in SharePoint – The White Pages
you can initially find the positions of < and > and then use List.Accumulate to create a loop and remove any occurance using the following fomrul (a is your text)
= [a="<p>Compliance for report</p>", b=Text.PositionOf(Source,"<",Occurrence.All),c=Text.PositionOf(Source,">",Occurrence.All),d=List.Reverse(List.Zip({b,c})),e=List.Accumulate(d,a,(x,y)=>Text.RemoveRange(x,y{0},y{1}-y{0}+1))][e]
You might be able to use the Xml.Document function.
Or you can try this custom function: fnRemoveHTML
(html as text)=>
[a=Text.BetweenDelimiters(html,"<",">"),
b=Text.Replace(html,"<" & a & ">",""),
c=if Text.Length(html)> Text.Length(b) then fnRemoveHTML(b) else html][c]
Parse the HTML and ask Power Query to return only the payload text.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
Here is the sample data coming from a Power App.
<p>Compliance for report</p>
I need it to display
Compliance for report
Sorry, but I dont understand specifically what you mean by
Parse the HTML and ask Power Query to return only the payload text.