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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
prateekraina
Memorable Member
Memorable Member

Convert string values to record in Query Editor

Hi,

 

Can anyone help me in converting string column to record in query editor.

I am pulling from a source which has some values in JSON and some as string for same column.

 

Sample Dataset:

 

TimeStampEventTypeCapabilityTypeCapabilityValueCapabilityStatus
4/18/2018 8:30:28 PM +05:30SYSTEMBATTERY_STATUS[Record]ENABLED
4/18/2018 8:30:29 PM +05:30SYSTEMINTERNET_CONNECTIONONLINEENABLED
4/18/2018 9:47:53 PM +05:30SYSTEMBATTERY_STATUS[Record]ENABLED
4/18/2018 9:47:53 PM +05:30SYSTEMINTERNET_CONNECTIONONLINEENABLED
4/18/2018 9:47:58 PM +05:30SYSTEMDEVICE_USAGE14.86ENABLED
4/19/2018 10:48:05 AM +05:30SYSTEMBATTERY_STATUS[Record]ENABLED
4/19/2018 10:48:06 AM +05:30SYSTEMINTERNET_CONNECTIONONLINEENABLED
4/19/2018 10:48:08 AM +05:30SYSTEMDEVICE_USAGE0.5ENABLED
4/19/2018 11:13:54 AM +05:30SYSTEMBATTERY_STATUS[Record]ENABLED
4/19/2018 11:13:54 AM +05:30SYSTEMINTERNET_CONNECTIONONLINEENABLED
4/19/2018 11:27:59 AM +05:30SYSTEMBATTERY_STATUS[Record]ENABLED
4/19/2018 11:27:59 AM +05:30SYSTEMINTERNET_CONNECTIONONLINEENABLED

 

I need to convert these string values to record so that i can then expand the column properly.

Any suggestion will be appreciated.

 

@ImkeF You are an expert in Power Query M. Hoping a response from you.

 

Prateek Raina

 

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

2 REPLIES 2
ImkeF
Community Champion
Community Champion

Hi @prateekraina, you're welcome.

I've wrote a blogpost about it: http://www.thebiccountant.com/2017/07/25/how-to-expand-a-column-that-cannot-be-expanded-in-power-bi-...

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

@ImkeF

Thank you once again !! 

 

Prateek Raina

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.