Forum Discussion
Add new text column in Excel but when refresh power BI Error
Hello,
Im looking to add a new column in my data source in the middle of the Excel file, When I hit refresh in Power BI I get an error. Ive read a lot of the forums but just cant figure it out.
I have a staffing forcast data table that I want to add an Include/Exclude Column in the Middle so the construction team can update what rows they want to inlclude/Exclude for the estimate. this seems like it should be relativivly easy? but dosent seem that way,
Appreciate anyones help
Anonymous You should remove the third line in the script, #"Changed Types" and set types after column headers are promoted. You can do this by clicking the x next to the left of #"Changed Types" in the Query Settings pane.
4 Replies
- jennratten
Super User
Hello - please post your Power Query script and include the error message you are getting. There could be many reasons for the error and the script will help us. Without seeing it my best guess is that the script contains an explicit reference to the table's structure which conflicts with the new structure once you add the new column.
- AnonymousNot applicable
Hey jennratten, See below
Does this work?
- jennratten
Super User
Anonymous You should remove the third line in the script, #"Changed Types" and set types after column headers are promoted. You can do this by clicking the x next to the left of #"Changed Types" in the Query Settings pane.
- v-jingzhang
Community Support
Hi Anonymous
As the error is "Column18" wasn't found. Can you click the steps in APPLIED STEPS pane one by one to find out from which step this error starts to appear? Also check whether this column exists in your data source Excel file.
Usually if a column is renamed in an earlier step or it is removed/renamed in the data source, the following steps which refer to it with the old name will have this error.
Dealing with errors - Power Query | Microsoft Docs
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.