Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
hi there,
Every month I get a brunch of 20 xls files containing 12+ columns. The name of those columns changed every month (typically previous 5 months, current month, next 6 months ) . How can I use the Table.ExpandTableColumn function without knowing the names of the columns ?
I tried Table.ExpanTableColumn(#"PreviousStep", "XlsContent",{*}) and, of course, it didn't work 🙂
I guess I should get them from a function, but I can't figure out wich one.
Can you help ?
thanks !
Solved! Go to Solution.
Hi @fsim
Please, see the attached file with a solution, it will look at all the column names within the tables and use this as a list to expand columns
Hello @fsim
use this codesnippet to understand how to build your Table.ExpandColumn dynamically.
ExpandAllColumns = Table.ExpandTableColumn
(
PreviousStep,
"ColumnToBeExpanded",
List.Union
(
List.Transform
(
List.Buffer(PreviousStep[ColumnToBeExpanded]), each Table.ColumnNames
(
_
)
)
)
)
in
ExpandAllColumns
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Hi @fsim
Please, see the attached file with a solution, it will look at all the column names within the tables and use this as a list to expand columns
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |