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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
CarlJoseph
New Member

Collapsing a JSON field (opposite of expanding)

I'm not familiar with PowerBI but need some help. We provide a JSON file to our customer and PowerBI appears to be expanding a certain column based on what it reads in the first line of the file. So some files we send it expands and other files it doesn't.

 

Scenario 1: PowerBI doesn't automatically expand `organization`

 

 

 

{"id":12345, "name":"Joanne Smith", "organization":null}
{"id":99999, "name":"P. Sherman", "organization":{"name": "ACME Corp", "id": 1566446, "address": "42 Wallaby Way, Sydney"}}

 

 

 

 

Scenario 2: PowerBI automatically expands `organization`

 

 

 

{"id":99999, "name":"P. Sherman", "organization":{"name": "ACME Corp", "id": 1566446, "address": "42 Wallaby Way, Sydney"}}
{"id":12345, "name":"Joanne Smith", "organization":null}

 

 

 

 

We want all files to be treated like the first scenario where `organization` isn't automatically expanded. This way, the user can select which attribute in the organization array they want to expand and which to ignore as in the image below.

 

Want we want to do with all filesWant we want to do with all files

 

When PowerBI encounters scenario 2, is there any way to undo the auto expansion of that column without having to manually delete each field (there are lots of them so it's time consuming to do each time!)

 

Thx.

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @CarlJoseph ,

When Power BI accesses a JSON file, oftentimes it automatically expands it based on what it thinks how you want to expand it which may not always be the case. The steps though are recorded which should be in the applied steps or in the advanced editor.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @CarlJoseph ,

When Power BI accesses a JSON file, oftentimes it automatically expands it based on what it thinks how you want to expand it which may not always be the case. The steps though are recorded which should be in the applied steps or in the advanced editor.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks. Is it possible to undo a step that was automatically applied? Here is what the applied steps looks like, and I would like to remove the expanded organization steps it automatically applied.

 

Screenshot 2024-06-28 at 11.43.44 AM.png

An "X" icon appears when you hover over a step. Clicking it will delete the step, effectively "unrecording" it. Please note that deleting a step will impact all subsequent steps and may cause errors.  Deleting cannot also be undone. You can click through the steps one by one to ensure they represent the desired transformations, then delete any unwanted steps after that.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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