Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I want to expand records column dinamically. Here is the code:
toExpand = Table.ExpandRecordColumn(#"Table to expand", "newColumn name", ListOfNamesToExpand) // ListOfRecords contains a list with text values of each column to expand
If I do this from UI it takes 2 seconds to expand all rows, but I want to expand it dinamically because data can change upon refresh. When I use the code it takes around 6h for 250 results. Is there a faster way to do this or I'm doing something wrong?
Thanks in advance,
Mario
Solved! Go to Solution.
I didn't compare old vs new code but new one is way faster:
convertToList= Record.FieldNames(Record.Combine(List.Select(Table.Column(#"Removed Other Columns","newColumnName"), each _ <> "" and _ <> null))),
ListOfNamesToExpand = Table.ExpandRecordColumn( #"Removed Other Columns","newColumnName", convertToList),
The problem was in creating the actual list.
I didn't compare old vs new code but new one is way faster:
convertToList= Record.FieldNames(Record.Combine(List.Select(Table.Column(#"Removed Other Columns","newColumnName"), each _ <> "" and _ <> null))),
ListOfNamesToExpand = Table.ExpandRecordColumn( #"Removed Other Columns","newColumnName", convertToList),
The problem was in creating the actual list.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
62 | |
52 | |
39 | |
24 |
User | Count |
---|---|
85 | |
57 | |
45 | |
42 | |
38 |