Forum Discussion
Table.FromRecords does not show all columns
- Anonymous5 years ago
Hi Everyone,
I want to thank Jimmy801 & CNENFRNL for your replies...
Just some feedback on the "solution" I figured out. I still believe the Table.FromRecords does not consider ALL the records to determine the columns for the table...
This function seems to work if your records do not contain the same fields for each record:
ExpandAll = (recTable as table, columnToExpand as text) => let result = Table.ExpandRecordColumn( recTable, columnToExpand, List.Distinct( Record.FieldNames( Record.Combine( Table.Column(recTable, columnToExpand) ) ) ) ) in result;The Combine is used to gather all the fields to get all the field names...
I hope this helps someone else 🙂
Kind regards,
Francois
Hello Anonymous
your function is written to expand only one Column a time and I can't see any json data. If you really want to expand all columns of a json data, look at this link to find a function that does exactly that
Here the link
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy