cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SteveZs
Advisor

SharePoint HTML conversion for column values

I'm using a SharePoint 2013 list as a data source, the multiple lines of text column values are being displayed as HTML in the query editor.

 

Sample column value:

 

"<p>​EOD Tuesday<br></p></div>"

 

Is there any way to convert HTML column values to plain text?

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: SharePoint HTML conversion for column values

Well, there is only "Text" in Desktop, no "HTML" format, so my guess is that your column in SharePoint is flagged as Rich Text versus Plain Text so you would need to change the column type in SharePoint, then it should strip out the HTML.

 

I am not aware of anything in DAX or "M" that will strip out HTML from text automagically but I'll look again.

 

Edit: Looks like your best bet is Text.Remove in "M"

https://msdn.microsoft.com/en-us/library/mt260472.aspx

 

You could give it arguments such as "<p>", "</p>", etc but the odds of stripping out all HTML, especially if there are attributes involved is pretty unlikely.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

5 REPLIES 5
Super User
Super User

Re: SharePoint HTML conversion for column values

Well, there is only "Text" in Desktop, no "HTML" format, so my guess is that your column in SharePoint is flagged as Rich Text versus Plain Text so you would need to change the column type in SharePoint, then it should strip out the HTML.

 

I am not aware of anything in DAX or "M" that will strip out HTML from text automagically but I'll look again.

 

Edit: Looks like your best bet is Text.Remove in "M"

https://msdn.microsoft.com/en-us/library/mt260472.aspx

 

You could give it arguments such as "<p>", "</p>", etc but the odds of stripping out all HTML, especially if there are attributes involved is pretty unlikely.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

Super User
Super User

Re: SharePoint HTML conversion for column values

SteveZs
Advisor

Re: SharePoint HTML conversion for column values

"change the column type in SharePoint, then it should strip out the HTML"

 

This worked

diverdown1964 Regular Visitor
Regular Visitor

Re: SharePoint HTML conversion for column values

There is a way to handle this elegantly - documented here - https://whitepages.unlimitedviz.com/2018/04/power-bi-report-rich-text-sharepoint/

Merchy2401 Frequent Visitor
Frequent Visitor

Re: SharePoint HTML conversion for column values

This worked like a charm & so easy to do (once you know its there!)

Thanks for sharing!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 307 members 2,950 guests
Please welcome our newest community members: