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
Anonymous
Not applicable

Parse JSON String in column

Hi,

How is possible to parse JSON string in the column to several columns?

Galat198_0-1607939402521.png

 

6 REPLIES 6
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

You may try adding a new step with the following m codes.

=Table.TransformColumns(#"Last Step",{{"device",Json.Document},{"geo",Json.Document},
{"app_info",Json.Document}})

 

Then you may expand the column to get the corresponding result.

 

For further information, please refer to the following link.

Convert JSON strings to tables in Power Query/ Power BI 

 

Best Regards

Allan

 

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

Anonymous
Not applicable

Hi,
Where I need to add  "New Step"?

Hi, @Anonymous 

 

You may right click the last step of the query and click 'Insert Step After' like below.

c1.png

 

Best Regards

Allan

Hi, @v-alq-msft , you might want to simply the code this way if the table consists of too many columns

= Function.Invoke(Table.TransformColumns, {#"Last Step", List.Accumulate(Table.ColumnNames(#"Last Step"), {}, (s,c)=>s&{{c,Json.Document}})})

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

you can use Table.TransformColumns or even better Table.TransformRows to loop through your data and applying a Json.Document on every cell. Surround it by try otherwise to handle empty rows or non-json-cells

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

mahoneypat
Microsoft Employee
Microsoft Employee

You should be able to use the Json.Document function to parse the JSON.  Depending on the structure, you will likely be able to expand the contained Records and/or Lists.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors