Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Rich text/HTML formatting in PowerBI table

Hi all, 

 

I currently have an important that comes with HTML mark-up due to how it is input into a database; so lots of <p> and <b> and a huge chunk of text that is generally unreadable. 

 

Is there a way to either:

  • Strip out all HTML mark-up
  • Apply the HTML formatting as a part of the table (this would be a preference)

I can alter the data via an excel export (as it's not a 'live' report), but not the direct source.

 

Thanks!

10 Replies

  • Apparently, the Real Answer is NO - Power BI is incapable of rendering HTML. How ridiculous. I work in a real company and can't use unsupported, user-made objects to make up for PBIs lameness.

    • faheem_Latif_BI's avatar
      faheem_Latif_BI
      Helper I

      Please create custom coumn and use this code , and enjoy

      if [HMTLField] = null then null else   Html.Table([HMTLField] , {{"text",":root"}})

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi thanks this worked for me. However the html format had bullet points hence, every new sentence was on new line. Is there any way I can maintain this (Html.Table([HMTLField] , {{"text",":root"}}) structure after this step?

    • Buffavento's avatar
      Buffavento
      New Member

      this is a custom visual can run html codes but Power BI does not allow custom visual links such as mailto!. 

  • Golly's avatar
    Golly
    Regular Visitor

    Another method that worked for me in SharePoint lists is to use the FieldValuesAsText field, as detailed here.

     

    First, you can remove the column(s) containing HTML.  Then, scroll right and select the expander icon for the “FieldValuesAsText” column. The "FieldValuesAsText" column appeared for me in the Navigation step.  Then deselect all available fields except your target column(s). In addition, deselect the “Use original column name as prefix” option.