Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I am new to bringing data in via api. I have a json report file brought into power query via api. After clearing out the rows that are just titles etc I am left with this:
My issue is the headers are one list and the data is a seperate one. Other files I have used have had the headers repeat in the data but this one does not. I want to get to a flat table but I can't work out how to seperate the headers and data.
When I click the two arrows I get to this stage:
This has the headers at the top and the rows still as a list below.
Can anyone offer a solution please?
Solved! Go to Solution.
let
Source = Json.Document(File.Contents("C:\Users\xxx\Downloads\response.txt")),
#"Converted to Table" = Table.FromList(
Source[rows],
Splitter.SplitByNothing(),
null,
null,
ExtraValues.Error
),
#"Extracted Values" = Table.TransformColumns(
#"Converted to Table",
{"Column1", each Text.Combine(List.Transform(_, Text.From), "|"), type text}
),
#"Split Column by Delimiter" = Table.SplitColumn(
#"Extracted Values",
"Column1",
Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv),
Source[columnNames]
)
in
#"Split Column by Delimiter"
Hi lbendlin,
Thanks for the pointers. File attached, Sample JSON
I have stripped it down to 2 records for ease and have changed any business data.
If you could point me towards any suitable function that would be great. It seems such a simple thing that I know I am missing something.
Thanks
let
Source = Json.Document(File.Contents("C:\Users\xxx\Downloads\response.txt")),
#"Converted to Table" = Table.FromList(
Source[rows],
Splitter.SplitByNothing(),
null,
null,
ExtraValues.Error
),
#"Extracted Values" = Table.TransformColumns(
#"Converted to Table",
{"Column1", each Text.Combine(List.Transform(_, Text.From), "|"), type text}
),
#"Split Column by Delimiter" = Table.SplitColumn(
#"Extracted Values",
"Column1",
Splitter.SplitTextByDelimiter("|", QuoteStyle.Csv),
Source[columnNames]
)
in
#"Split Column by Delimiter"
Thanks, the original source was an api but I addressed that by swapping the code line with the filename for the four lines of the api call.
It all seems to be working now - thank you very much.
There are Power Query functions for that. Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.