Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi ,
I have a SQL table with columns and one of the columns contain a json string. I would like to have a flat table ie to expand the column, however the json varies from field to field.
Tx,
gabor
Hi @faludigabor,
Since your json files don't have the uniform fields, you need more work based on the idea of @MarkLaf. Please try it out in this file.
1. Add a customer column with the following formula.
Json.Document([Column2])
2. Add the following statement to retrieve all the fields of all the jsons in the Advanced Editor.
#"Expanded Column1" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"premise_zipcode", "city", "address", "need_invoice","bankcard_number", "seat_zipcode", "note"}, {"premise_zipcode", "city", "address", "need_invoice","bankcard_number", "seat_zipcode", "note"})
It's easy to replace the NULLs and Errors.
Best Regards,
Dale
Add a custom column and enter the following:
Json.Document([metadata])
If you are worried about errors (e.g. from instances of [] etc.), you can use the following:
try Json.Document([metadata]) otherwise null
The resulting custom column can be expanded.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
38 | |
30 | |
27 |
User | Count |
---|---|
99 | |
87 | |
45 | |
43 | |
37 |