Forum Discussion
dt
6 years agoFrequent Visitor
json record to table
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("http...
- 6 years ago
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"Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
dt
6 years agoFrequent Visitor
I upgraded to Version: 2.73.5586.1501 64-bit (September 2019)
Now everything is all right, thanks!
dt
6 years agoFrequent Visitor
Hi Mariusz
Sorry, my query looks a little different:
I uploaded json record to table.pbix here: json record to table
- Mariusz6 years agoCommunity Champion
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"Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.