Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
5 years ago
Solved

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.

  • 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

     

    no modify, then refresh 

     

    Best Regards,
    Henry


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

2 Replies

  • 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.




     

  • v-henryk-mstf's avatar
    v-henryk-mstf
    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

     

    no modify, then refresh 

     

    Best Regards,
    Henry


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