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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
WishAskedSooner
Continued Contributor
Continued Contributor

SQL Server Column Name Change Error

Hi Experts!

 

I am inexperiencing a bizarre error. A column name was changed in SQL Server. I am connecting to the table in PQ via the following:

 

Sql.Database("xx.x.x.xxx", "MyDB", [Query="SELECT * FROM [MyTable];", CreateNavigationProperties=false])

 

However, PQ is still reading in the original column name, and I have no idea why. I even tried to create a New Data source, and it still reads in the original column name, not the updated column name.

 

For additional context, the column that changed names was originally being removed from the Data Model in PQ with a Table.SelectColumns command. I don't know exactly when the column name was changed, but it was a while ago and PBI has been re-started countless times. Now, I need the column.

 

It is like PBI/PQ is stuck on some previous instance of SQL Server. Of course, when I query the table in SSMS, the current column is returned.

 

So, now, I am wondering is part of the problem due to the fact that I am querying the table directly versus a View? What is best practice?

 

Any help is greatly appreciated!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

Thanks for Greg_Deckler 's concern about the problem and i want to offer some more informaiton for user to refer to.

hello @WishAskedSooner , based on your description, you can click the refresh button in power query after changing the column name in data source.

vxinruzhumsft_0-1734313673192.png

And if you need to recreate the connector, you need to clear the data source permission data source serttings in power bi , then reconnect it.

vxinruzhumsft_1-1734313796056.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi,

Thanks for Greg_Deckler 's concern about the problem and i want to offer some more informaiton for user to refer to.

hello @WishAskedSooner , based on your description, you can click the refresh button in power query after changing the column name in data source.

vxinruzhumsft_0-1734313673192.png

And if you need to recreate the connector, you need to clear the data source permission data source serttings in power bi , then reconnect it.

vxinruzhumsft_1-1734313796056.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Greg_Deckler
Community Champion
Community Champion

@WishAskedSooner How did you change the column name in SQL?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

As you guessed, changing a column name in SQL Server is not a trivial exercise. It involves taking down all your keys, dropping the table, and re-creating it from scratch if doing it manually, or using a tool like SSDT. Why do you ask?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.