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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LJR
Frequent Visitor

Multi dimensional JSON file to one flat table

I have a multi-dimensional table from a json source that I'm trying to convert into one flat table. I can expand the columns up to a point, and still have tables within rows as in the below: 

 

Example 1.PNG

 

The problem I'm having is that when I expand these tables e.g. in the parent column, it opens them up as another seperate table. See example below: 

 

Capture 3.PNG

 

Is there a way to automatically expand these tables within the original query instead of having each table expand into a new seperate table view? 

1 ACCEPTED SOLUTION

Hi Lydia

 

The end solution that worked was to have the json data coming through via an API "flattened" by our developer to provide a simpler table for analysis. I ended up not working with the issue in Power BI as there was another solution in code.  

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

@LJR,

ImkeF has provided a detailed solution about this issue in the similar thread below, please add a custom column in your query following her guide and then expand the custom column.

http://community.powerbi.com/t5/Desktop/Expand-column-where-not-all-records-are-tables/td-p/79060

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lydia. I tried this solution but got an error message when trying to apply it:

 

Expression.Error: We cannot convert a value of type Table to type List.
Details:
Value=Table
Type=Type

 

Image 10.PNG

@LJR,

Could you please post the JSON code so that I can  test?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Lydia

 

The end solution that worked was to have the json data coming through via an API "flattened" by our developer to provide a simpler table for analysis. I ended up not working with the issue in Power BI as there was another solution in code.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors