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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Parth_1
Helper I
Helper I

How to expand record column dynamically with Power Query

I am expanding the specifications column. The available data is expanding successfully. But when the records are aaded in future in specification column it does not expand it all. 
What query will help in expanding the records dynamically. Below are the images of record column and the query of expanding.image (11).pngimage (12).png

Thanks in advance.

1 ACCEPTED SOLUTION

= Table.ExpandRecordColumn(#"Reordered Columns", "specifications",Record.FieldNames(Record.Combine(product_data[specifications])))

View solution in original post

7 REPLIES 7
AlienSx
Super User
Super User

@Parth_1 if all records have the same set of fields then read field names into some variable using Record.FieldNames(your_table[specifications]{0}) and use it in expand step. 

= Table.ExpandRecordColumn(#"Reordered Columns", "specifications",Record.FieldNames(product_data[specifications]{0}))

As per your suggestion I Expanded the column with above code but it does not expanding all the records in specification column itself.

@Parth_1 make sure that product_data has valid records in specifications column. Try solution provided by @wdx223_Daniel but still pay attention to product_data table. 

Thank You for the solution and suggestion.

= Table.ExpandRecordColumn(#"Reordered Columns", "specifications",Record.FieldNames(Record.Combine(product_data[specifications])))

Anonymous
Not applicable

I try to tackle the same issue but keep getting the error that there is a loop. How can I make sure i indicate the right column?

adudani
Super User
Super User

hi @Parth_1 
Intermediate steps containing the dynamic list of all column names would be required.

in the step shown in the screenshot, you would input the step name instead of the hard-coded values.

 

Kindly provide a sample input masking sensitive data incase further troubleshooting is required.

 

Refer to example 1 in this video for a similar concept: The Magic of working with Lists in Power Query (youtube.com)

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors