Forum Discussion

Josdash's avatar
Josdash
Frequent Visitor
4 years ago
Solved

Expression.Error: We cannot convert the value " xxxx" to type Table.

Hi everybody,   I am working with an XML file and when I expand the column description I get the following error: "Expression.Error: We cannot convert the value " <![CDATA[ <para></p..." to type ...
  • Josdash's avatar
    4 years ago

    Hi everybody,

     

    I could solve the issue by transforming the column "Description" containing both tables and texts before expanding it with the following code:

     

    #"Lists from description" = Table.TransformColumns(#"Expanded specdocument.specobjects.specobject.oreqmViolations",{{"specdocument.specobjects.specobject.description", each if _ is table then Table.ToList(_) else {_}}}),
    #"Expanded specdocument.specobjects.specobject.description" = Table.ExpandListColumn(#"Lists from description", "specdocument.specobjects.specobject.description")

     

    I based on this link -> https://community.powerbi.com/t5/Desktop/Expand-Column-Containing-Some-Tables/m-p/409196 

     

    Thank you anyway.

    José