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
kgr
Frequent Visitor

Accidentally deleted table from Model View

Hi, 

 

I wanted to delete a certain relationship between two tables but instead a complete table was deleted. I marked the relation with the mouse and used the "delete key" to remove it . I see no way to undo this "simple" mistake and I think this is something to improve. 

 

Has someone else experienced this? My learning is that I have to be extra careful in "Model view", even though you click on a relation it is not marked. My last hours work have to be redone because of this. And I think this could easily happen to other people. 

 

Brgds,

Kai

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @kgr ,

 

You are correct about the behaviour, if you want to delete the relationship you need to rigth click the relationship.

 

Also be sure to read the pop up menu that confirms what you are deleting. 

 

For sure you also do this but I always do a save before doing a change in a relationship or delete a table, that way if I do any mistake I can just close and reopen the file.

 

Maybe you can post an idea on the ideas part of the forum to get the relationship selected when you click and not the table.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

11 REPLIES 11
Cyborg
New Member

If you delete table(s) accidently, you can recover them by adding file via Get Data and then selecting just those sheets from the workbook that were deleted. Go to Transform Data and make all the necessary changes that you'd like to make. Under Model tab, you'll see the recovered sheet(s), linked to other sheets. Hope this helps!

Blackberry98
New Member

Hi - this happened to me. I just referenced same table in transform view, which is then added to model. Hope it helps 🙂

Hi @Blackberry98 ,

 

Don't understand what you mean bhy referencing the same table in the transform view?

 

If you delete a table that is not based on another query or referenced then you won't be abble to have it back except by redoing all the table from sracth.

 

If it's a reference one you need to redo the steps in this case the reference one.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Syndicate_Admin
Administrator
Administrator

I am surprised that Power BI professionals say that there is no solution and if there is, what they must do is go to transform data, they look for the table that they deleted by mistake and on the right side where the applied steps appear remove the deletion step, it worked for me to recover a column of the table, I imagine it must be the same for a complete table

Hi @Stivens_Agudelo ,

 

When you delete a column there is an additional step that is added to your power query, that is why you can go back to your query and just delete that step and return to the previous state. However when you delet a table you are deleting the query itself not just adding a step to your query.

 

There is no option to revert an accidental delete of a table.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



aglakshmi
New Member

lost hours of work! very annoying! Is there any way to recover? 

jthornto
Regular Visitor

This also happened to me and I lost a whole day. It is really frustrating that there is not an undo. That seems very very basic. If Tableau can manage to have an undo button, so should power bi. At the very least uncouple the delete table from from the delete relationship menu. They read too similarly especially when you are moving quickly in a flow state. Poor Design.

MFelix
Super User
Super User

Hi @kgr ,

 

You are correct about the behaviour, if you want to delete the relationship you need to rigth click the relationship.

 

Also be sure to read the pop up menu that confirms what you are deleting. 

 

For sure you also do this but I always do a save before doing a change in a relationship or delete a table, that way if I do any mistake I can just close and reopen the file.

 

Maybe you can post an idea on the ideas part of the forum to get the relationship selected when you click and not the table.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I see this is marked as solved, but please verify if this is a solution. Go to Power Query Editor, assuming the table is still there, right click the table and select "Enable Load"

Finally a direct solution. I had a single table, deleted it from the model view, and couldn't find a solution. This worked immediately. Thank you.

Hi @PowerBIAmature ,

 

This depends on the type of table you have and how you are pushing it to the model. If the table is bveing referenced or merged with another table what you refer is correct and your table get's disable the load.

However if it's a standalone table (from the power query perspective) that will get deleted from the model.

 

But very well observed.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.