Forum Discussion
Alexck
4 years agoRegular Visitor
Table expansion not working
Hi all, I am opening a XML file and after expanding the tables I get stuck with a not expandable table, but it has data inside which should be converted into collumns. As you can s...
- 4 years ago
NewStep=Table.ExpandTableColumn(Table.TransformColumns(PreviousStep,{"CpfCnpj",each if _ is table then _ else #table({"Cpf"},{})}),"CpfCnpj",{"Cpf","Cnpj"})
Anonymous
4 years agoNot applicable
Hi Alexck
You can add a custom column to get the value, if you have only one column and one value like the examples above, and wrap try...otherwise if any error occurs
Table.AddColumn(yourPreStep, "newColumnName", each Record.ToList( [yourOriginColumn]{0}){0})
- Alexck4 years agoRegular Visitor
Hi Anonymous ,
I've inputed the format you provided me, but it didn't work correctly. Problably I'm messing something up.
Is this what you meant?
Thanks,
- Anonymous4 years agoNot applicable
Hi Alexck
it should be the original column name
Table.AddColumn(yourPreStep, "newColumnName", each Record.ToList( [CpfCnpj]{0}){0})