Forum Discussion

jcastr02's avatar
jcastr02
Icon for Post Prodigy rankPost Prodigy
1 year ago

expanding custom column from Html column

I have an HTML Column that I'm trying to convert to text.  I use the formula for custom column 
Html.Table([my column], {{"text", ":root"}}))

I do have  Blanks from the HTML Column 

When I create the custom column, the rows with blanks create an error.  If i try to replace those errors with blanks, then it doesn't let me expand the column. 

If I just expand the custom column without removing the errors - then I get error  Expression.Error: We cannot convert the value null to type Text.
Details:
Value=
Type=[Type]

Any help is appreciated


9 Replies

  • Please provide sample data that fully covers your issue.
    Please show the expected outcome based on the sample data you provided.

    • jcastr02's avatar
      jcastr02
      Icon for Post Prodigy rankPost Prodigy

      Hello lbendlin - see below I'm trying to convert the NeedtoKnow column to the expected outcome column - it seems the null values are causing issues (even though I replace null values with "".

      IdLOBSubjectNeedtoKnowExpected Outcome
      248Central UtilityCRSM: Change Healthcare Cyber Security Issuenull 
      249Central UtilityCRSM: Change Healthcare Cyber Security Issuenull 
      250Central UtilityCRSM: Change Healthcare Cyber Security Issuenull 
      251Central UtilityCRSM: Change Healthcare Cyber Security Issuenull 
      252Central UtilityCRSM: Change Healthcare Cyber Security Issuenull 
      253TestThis is a test of the communication application<div class="ExternalClass2A5FD88EB9564E91B94F781A7C0166CE"><p>This will be the need to know section.</p></div>This will be the need to know section
      254TestThis is a test of the communication application<div class="ExternalClass9BE4188F1B224A2AB16E5580E9D5AA98"><p><span style="font-size&#58;11pt;"><span><span style="font-size&#58;15.0pt;">This will be the need to know section.</span></span></span></p></div>This will be the need to know section.
      256PCCREMINDER: SOP 2.10.1 Linking Buyout Profiles<div class="ExternalClassB797D798C5B44B18AB82CE2DB706A4E2"><p><span style="font-size&#58;11pt;"><span>When acquires a competitor pharmacy, the patient profile/prescription records can be located in the “Buyout Search” tab in POWER.</span></span></p></div>When acquires a competitor pharmacy, the patient profile/prescription records can be located in the “Buyout Search” tab in POWER.
      • ryan_mayu's avatar
        ryan_mayu
        Icon for Super User rankSuper User

        maybe you can try this in PQ

         

        = Table.AddColumn(#"Promoted Headers", "Custom", each Text.BetweenDelimiters([NeedtoKnow],".",">",{0,RelativePosition.FromEnd},{0,RelativePosition.FromEnd}))

         

  • jcastr02's avatar
    jcastr02
    Icon for Post Prodigy rankPost Prodigy

    I had my columns as text or numbers - thus causing errors.  Once I changed the HTML column first to a text column ,then did the custom column - it worked.  Sorry for the confusion all.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,jcastr02 
      We are absolutely delighted to hear that the issue has been resolved. If you’re inclined, you might consider accepting this solution, as it could also assist other community members facing the same problem, enabling them to find a resolution more swiftly
      .

      Of course, if there is anything else we can do for you, please do not hesitate to contact us.

      Looking forward to your reply.

      Best Regards,

      Leroy Lu