admin管理员组文章数量:1125015
I have a Power BI dataset with one column that contains HTML tags. I have tried to make a custom column with the following code:
try Html.Table([HTML Text],{{"PlainText",":root"}}) otherwise null
However, when I do this the values from the original column are all over the place. Some rows which did not contain any text, now do and vice versa. Am I doing something wrong? It is important that the values remain in their original rows if that makes sense. So I would like to exclude the HTML tags from my column while keeping the text in the right rows.
Below is an example:
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;">Allen,</span></p><p class="ql-align-justify"></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;"></span></p><p class="ql-align-justify"> </p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;">Zie onder het antwoord van </span></p><p class="ql-align-justify"></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;">Het antwoord lijkt mij afdoende zo, tenzij jullie nog aanvullende vragen of opmerkingen hebben?</span></p><p class="ql-align-justify"></p>
I have a Power BI dataset with one column that contains HTML tags. I have tried to make a custom column with the following code:
try Html.Table([HTML Text],{{"PlainText",":root"}}) otherwise null
However, when I do this the values from the original column are all over the place. Some rows which did not contain any text, now do and vice versa. Am I doing something wrong? It is important that the values remain in their original rows if that makes sense. So I would like to exclude the HTML tags from my column while keeping the text in the right rows.
Below is an example:
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;">Allen,</span></p><p class="ql-align-justify"></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;"></span></p><p class="ql-align-justify"> </p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;">Zie onder het antwoord van </span></p><p class="ql-align-justify"></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:#1F497D;">Het antwoord lijkt mij afdoende zo, tenzij jullie nog aanvullende vragen of opmerkingen hebben?</span></p><p class="ql-align-justify"></p>
Share Improve this question edited 2 days ago Sam Nseir 11.6k2 gold badges4 silver badges20 bronze badges asked 2 days ago MagdalenaMagdalena 11 bronze badge New contributor Magdalena is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 0I'm not sure why that happened for you. Did the rows mess up directly at this step or another step further down?
Try updating your Custom Column to:
try Html.Table([HTML Text], {{"PlainText",":root"}}){0}[PlainText] otherwise null
Or to this one if you want to remove excess whitespace:
try Text.Clean(Html.Table([HTML Text], {{"PlainText",":root"}}){0}[PlainText]) otherwise null
本文标签: powerbiPower BIRemove all HTML tags in one columnStack Overflow
版权声明:本文标题:powerbi - Power BI - Remove all HTML tags in one column - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736643994a1946063.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论