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!
I work in an bilingual organization. Many of our spreadsheets have a VBA function that translates the table headers on request. These tables need to be data sources for various queries. But a query fails when the source headers are different (ie translated) from what they were when the query was built.
What is the best way to query an Excel table with dynamic column headers?
Here is some toy data:
TableX (with English headers)
| Colour | Name |
| blue | Bob |
| green | Jill |
TableX (with French headers after VBA swaps in the translations)
| Couleur | Nom |
| blue | Bob |
| green | Jill |
Solved! Go to Solution.
Add the following step custom after your source step (replace ... with your other columns):
Table.RenameColumns(Source, List.Zip({Table.ColumnNames(Source), {"Colour", "Name", ...}}))
To translate back, at the end of your query add (replace previousStepName with your last step):
Table.RenameColumns(previousStepName, List.Zip({Table.ColumnNames(previousStepName), Table.ColumnNames(Source)}))
Add the following step custom after your source step (replace ... with your other columns):
Table.RenameColumns(Source, List.Zip({Table.ColumnNames(Source), {"Colour", "Name", ...}}))
To translate back, at the end of your query add (replace previousStepName with your last step):
Table.RenameColumns(previousStepName, List.Zip({Table.ColumnNames(previousStepName), Table.ColumnNames(Source)}))
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 |
|---|---|
| 15 | |
| 11 | |
| 11 | |
| 8 | |
| 6 |