Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
WJ876400
Helper IV
Helper IV

Convert HTML to Text

Hi

 

I have a share point list that has comments in HTML. I have used the below formula to convert to plain text in Power Query

 

Html.Table([ColumnName] , {{"text",":root"}})

 

however there are rows that have no comments in the sharepoint list and the formula errors saying that the type null can not be converted to text. how do i get around this issue.

 

thanks

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @WJ876400 

You can deal with this error by usng try ... otherwise like so

try Html.Table([ColumnName] , {{"text",":root"}}) otherwise null

So if you encounter an error at this point, Power Query will just return null and the query won't stop at this step.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

5 REPLIES 5
PhilipTreacy
Super User
Super User

Hi @WJ876400 

You can deal with this error by usng try ... otherwise like so

try Html.Table([ColumnName] , {{"text",":root"}}) otherwise null

So if you encounter an error at this point, Power Query will just return null and the query won't stop at this step.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


v-lionel-msft
Community Support
Community Support

Hi @WJ876400 ,

 

Is it like this?

v-lionel-msft_0-1611210673279.png

Would you mind providing your HTML code? I hope to test it.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello @WJ876400 ,
You can refer to this link 

Hi @Anonymous 

 

Thanks for the response, i have followed the steps but it hasn't worked. I don't get the options in the example on the drop down menu

 

WJ876400_0-1611067802591.png

 

Anonymous
Not applicable

Hello @WJ876400 
Expand the column and check are you getting the expected result.
You can refer this link

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.