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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a data source(Excel) where it has columns as below,
Region category Sales
A X 100
B Y 200
after conencting to dats source I have changed the column names and data in data source(Excel file)
Country Product Forecast Sales
A X 100
B Y 200
C Z 300
when i refresh the source it thrown me error that column names not found.
I know work around to change column name dynamically by adding M code in query editor but it needs to mention for every column . assume if I have 10 columns and changing 5 columns it should have 5 line extra code to rename columns .
Is there any better way that power bi handles changing column names dynamically ?
it should be basic feature because most of the visualization tolls handle it with out changing code ex like Spotfire, tableau detect by default and give an option to choose column or replace columns with new columns.
A quick help would be appreciated.
Hi @Anonymous ,
When you open an excel file, you can click edit option to enter query editor. Then you need to find “Changed Type” in the APPLIED STEPS and delete it. Then click Close & Apply. This table’s column names can be dynamic when you update your excel files.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 47 | |
| 43 | |
| 26 | |
| 19 |
| User | Count |
|---|---|
| 198 | |
| 126 | |
| 102 | |
| 68 | |
| 51 |