Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
I'm trying to remove all text between < and > including the carrots from a column in Query Editor.
I thought about splitting the column with the ? being the delimiter, then creating a column with "?", and then concatenating but the first example wants shows that there are cells with styling before the question mark.
Thanks in advance!
Here are two examples:
Click <b>YES/b> if you watched the Super Bowl?
Did you watch the Super Bowl?<span style="font-size:14px !important; display: block;">Click YES if you did.</span>
<div id="disclaimer-1">You may be eligible for a free high five if you watched the Super Bowl.</div>
<style type="text/css" id="customCSS">
.Qid1 .answers{
position: relative;
top: -130px;
}
.Qid1 #disclaimer-54269{
position: relative;
top: 175px;
display: block;
width: 100%;
margin: auto;
text-align: justify;
font-size: 10px;
line-height: 16px;
color: #999;
}
@media all and (min-width: 600px){
.Qid1 .answers{
top: -120px;
}
.Qid1 #disclaimer-54269{
font-size: 12px;
line-height: 20px;
}
}
@media all and (min-width: 601px){
.Qid1 .answers{
top: -75px;
}
.Qid1 #disclaimer-54269{
top: 175px;
float: none;
display: block;
width: 100%;
}
}
@media all and (min-width: 900px){
.Qid1 #disclaimer-54269{
top: 85px;
}
}
</style>
Solved! Go to Solution.
I transformed it into a proper function here 🙂 https://github.com/ImkeF/M/blob/master/Library/Text.RemoveHtmlTags.pq
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hello my friend!
I´m having the same issue. Did You get a solution?
Thanks.
Dan
Thank so much for transforming into a proper function!
I just have some beginner level follow-up questions on how to implement the M script.
The data file I'm using is calle "SurveyResponses_Age&Vertical"
Should I be replacing Source = Text.From(HTML) to Source = Text.From(SurveyResponses_Age&Vertical) ?
Is it best to use the Advanced Editor, and if so, how what's the proper syntax for that?
Thanks!
Please see if this video helps: https://www.youtube.com/watch?v=6TQN6KPG74Q
If not, please come back here.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
67 | |
57 | |
54 | |
36 | |
34 |
User | Count |
---|---|
84 | |
71 | |
55 | |
45 | |
43 |