Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sjrrkb123
Helper III
Helper III

Parsing Json File Giving Unexpected Results

I am trying to import a .json file using the Power BI .json connector and am running into some issues. 

 

Everytime I import the .json file I get this as a result:
json screenshot.png

 

I had hoped it would natively expand the lists and records into a usable file. I am dreading having to do this one by one. 

 

Any thoughts on how to proceed?

1 ACCEPTED SOLUTION
miguel
Community Admin
Community Admin

Hey!

It really depends on your json and how it's structured.

What's inside of those lists? is it effectively a list of records? do those records have the same or quite a similar schema to the records that are shown in your screenshot?

 

If the latter is true, then you can try and transform the record values in your column to be a list of records.

Basically create a new columns using the code below:

if Type.Is( Value.Type([ColumnNameGoesHere]), type record) then {[ColumnNameGoesHere]} else [ColumnNameGoesHere]

 That new column would have a single type which should be the list which you can later expand and then later expand the records. 

 

But in the end it all depends on how your json is structured

View solution in original post

3 REPLIES 3
sjrrkb123
Helper III
Helper III

It appears your line of code worked @miguel . I suspect PBI did not know how to handle the fact that some parts of the json are multiple levels deep while others are single level. Thanks!

Anonymous
Not applicable

Hi @sjrrkb123 ,

 

For your scenario, here is a similar thread for your reference:

Transforming json with power query (mix of list and record in a single column)

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

miguel
Community Admin
Community Admin

Hey!

It really depends on your json and how it's structured.

What's inside of those lists? is it effectively a list of records? do those records have the same or quite a similar schema to the records that are shown in your screenshot?

 

If the latter is true, then you can try and transform the record values in your column to be a list of records.

Basically create a new columns using the code below:

if Type.Is( Value.Type([ColumnNameGoesHere]), type record) then {[ColumnNameGoesHere]} else [ColumnNameGoesHere]

 That new column would have a single type which should be the list which you can later expand and then later expand the records. 

 

But in the end it all depends on how your json is structured

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.