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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Delete column a table

Well, deleting a column in an Excel Table and refreshing in Power BI gives the process an error when you can't find that column. How can I avoid this error for uploading?

Thank you.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

The reason for the above error is that the original data is modified in the data model imported from excel (I converted the type of the column field in the above), and then the column is deleted in excel, and an error will be reported after refreshing the data set. If the data model is not modified or the modified column is not deleted in excel, then no error will be reported.

 

change column type

vhenrykmstf_0-1626247863499.png

vhenrykmstf_1-1626247871211.png

 

no modify, then refresh 

vhenrykmstf_2-1626247930157.png

vhenrykmstf_3-1626247951737.png

 

Best Regards,
Henry


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

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

The reason for the above error is that the original data is modified in the data model imported from excel (I converted the type of the column field in the above), and then the column is deleted in excel, and an error will be reported after refreshing the data set. If the data model is not modified or the modified column is not deleted in excel, then no error will be reported.

 

change column type

vhenrykmstf_0-1626247863499.png

vhenrykmstf_1-1626247871211.png

 

no modify, then refresh 

vhenrykmstf_2-1626247930157.png

vhenrykmstf_3-1626247951737.png

 

Best Regards,
Henry


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

Fowmy
Super User
Super User

@Syndicate_Admin 

If you delete a column that is used in your model and also you have done Power Query transformations, you will definitely encounter an error. 

You will have to conditionally prepare your M code to check if the expected columns are available. This is tough work. Better, ensure the Excel files are protected using Workbook Protection.




 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.