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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
khacwee
Frequent Visitor

Split Column A to multiple Columns, but Headers of each new column is within the values of Column A

Dear all,

 

I have a table looks like below and I am trying to split Column A into mulitple new columns.

 

However, split by delimiter will not work since the values of all new columns will contain Header name (eg. order_id) within it. 

 

I have tried all the split functions in power query and the closest is to split by comma but all the values will still contain header name.

 

Please help !

 

khacwee_0-1704957372837.png

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi

 

Select "Column A"  / Transform / Parse/ JSON

Expand Record

 

= Table.TransformColumns(Prev_Step,{{"Column A", Json.Document}})

Stéphane 

View solution in original post

2 REPLIES 2
collinsg
Super User
Super User

Good day khacwee,

Your column A looks like JSON format. On the "Transform" ribbon of Power Query, the "Text Column" contains a "Parse" button. Clicking the drop-down arrow beside "Parse" offers "JSON" as an option. Choosing this will turn column A into a column of records. You can then expand column A to get the result you desire.

Hope this helps

collinsg_0-1704958544356.png

 

slorin
Super User
Super User

Hi

 

Select "Column A"  / Transform / Parse/ JSON

Expand Record

 

= Table.TransformColumns(Prev_Step,{{"Column A", Json.Document}})

Stéphane 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors