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.
Hello.
I have rest-api result
{
"name": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
}
}
I am exec this query:
let
ApiCall = () =>
let
Source = Json.Document(Web.Contents("https://contoso.com/api")),
#"Converted to Table" = Record.ToTable(Source[name])
in
#"Converted to Table"
in
ApiCall
and get two-column table:
How-to convert this table to
?
Solved! Go to Solution.
Hi @dt
Try Adding
= Table.ExpandRecordColumn(#"Converted to Table", "Value", {"key1", "key2", "key3"}, {"key1", "key2", "key3"})
Hi @dt
Try this,
// output
let
Source = name,
#"Converted to Table" = Record.ToTable(Source),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Value", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Name]), "Name", "Value")
in
#"Pivoted Column"
Hi @dt
I've converted your sample JSON to a flat-file and used it as a base for my query, I've attached the result with JSON converted to records for the reference.
name = JSON translated to a record
output = transformed query
let me know if "name" is in wright structure.
Thank you!
But still getting the error.
Any ideas?
Hi @dt
Sorry for the late reply.
I've used the JSON sample from your original post and produced a solution in the attached file, please can you ensure that the sample is a true reflection of your scenario, if not, please can you adjust.
Unfortunately, your screenshot does not give enough information to understand the error.
Yes, this fully reflects my problem.
Your solution in the attached file not work.
My PowerBI Desktop Version: 2.73.5586.1241 64-bit (September 2019).
What information is needed?
Hi @dt
Please see the below.
Once converted your sample to a record it will look like below.
Step 1 - Source // no error as on the attached.
Step 2 - Convert to table // no error
Step 3 // Expanded Value
Please can you confirm in witch step do you start getting the error message?
As demonstrated above, all is working fine on my end.
I upgraded to Version: 2.73.5586.1501 64-bit (September 2019)
Now everything is all right, thanks!
Hi @Mariusz
Sorry, my query looks a little different:
I uploaded json record to table.pbix here: json record to table
Hi @dt
Try this,
// output
let
Source = name,
#"Converted to Table" = Record.ToTable(Source),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Value", type text}}),
#"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Name]), "Name", "Value")
in
#"Pivoted Column"
Hi @dt
Try Adding
= Table.ExpandRecordColumn(#"Converted to Table", "Value", {"key1", "key2", "key3"}, {"key1", "key2", "key3"})
Getting an error
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
38 | |
31 | |
27 |
User | Count |
---|---|
91 | |
49 | |
44 | |
39 | |
35 |