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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Transform hierarchy JSON to flat Excel

Hello community,

 

I have the following JSON structure:

https://pastebin.com/G1aNR0eE

It is hierarchy structure which I want to convert to a flat structure in Excel.

The final structure should be like this:

Capture.PNG

I found this thread: https://community.powerbi.com/t5/Integrations-with-Files-and/Multi-Dimensional-Json-file-to-Table/td...

I followed the solution @v-yuezhe-msft  mentioned there until the step 4. Where I do not know how to map/link the higher level of the JSON file.Capture1.PNG

Can you please help me to understand how can I link different levels of the JSON hierarchy and export it to the Excel file?

 

Thank you

Ondrej

1 ACCEPTED SOLUTION

Hi @Anonymous 

You may try to create a matrix visual.Then you may use 'Expend' feature to achieve that.

Regards,

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

View solution in original post

3 REPLIES 3
v-cherch-msft
Employee
Employee

Hi @Anonymous 

Please have a look at below articles to check if they could help.

https://www.mssqltips.com/sqlservertip/4621/using-power-bi-with-json-data-sources-and-files/

https://www.thebiccountant.com/2017/08/30/how-to-open-a-complex-json-record-in-power-bi-and-power-query/

https://www.howtoexcel.org/power-query/how-to-access-a-json-api-with-power-query/

For 3rd party Links:

Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @v-cherch-msft ,

 

Thank you for your post. I decided to move the data to the database as it is more natural to me. Then I was able to create the following table:current.PNG

But I would like to have lit like this:final.png

Can you please advice how to do that? All the guides I found finished with a full table with all values in place, but I need all values there just once and in this hierarchical structure. And even better... Would be possible to indent each level like this?Capture.PNG

I found e.g.:

https://community.powerbi.com/t5/Desktop/Adding-indentation-and-hierarchy-to-a-list-of-project-tasks...

https://community.powerbi.com/t5/Desktop/show-grand-totals-top-bottom-of-matrix/m-p/408946#M187480

 

But it is done for just one column (and inside) and not for a set of columns.

I have another idea... I can concatenate data from each table to one column:source1.PNG

But In this case, I need it with the intent... Capture.PNG

Can you please advise which way would be better?

 

Thank you

Ondrej

Hi @Anonymous 

You may try to create a matrix visual.Then you may use 'Expend' feature to achieve that.

Regards,

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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