Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper II
Helper II

Possible to completely replace a table in a model with a newly devloped version of it?

I have an existing data table (built from loading a directory full of Excel files with fairly complicated transformations) that I would like to replace with a completely newly developed version (new table in the same model) - I'd rather not delete the first one as I'd have to redo all of my relationships and measures.  Is there a simple way of doing this? 


Theoretically I could maybe just go into the artifacts and overwrite all the M via the advanced editor, but even if this was possible, it seems that for the main object I want to place, the "Transform Sample File" object seems to have somehow become hidden (which is a big part of the reason I rewrote it from scratch).  It still seems to exist somewhere and continues to execute, but I have no idea how I would get it to reappear.  (But even if it did, I still want to overwrite that tab;e with this new and improved one).

Super User
Super User

If you go into the query editor for your final table, right click > edit query


You should see all the queries present in the .pbix file.  Do you have the transform queries listed there?


I agree that the way to do it is to modify the M code in your final table to use the new source.  If I were you I would add the new source to your model and get it to match the old table EXACTLY (data types, column names, etc) and remember Power Query is case sensitive so you want your column names to be the exact same.

Once you are satisfied you can go into the advanced editor for the new query and copy the code then replace the code for the old query.

That's the thing though, that object seems to have somehow become hidden, I'll show a screenshot:


2019-09-17 09_18_04-BDI - Power Query Editor.jpg

You may notice I've also managed to get inconsistent incremental numbering on some of the different objects within the same folder, perhaps due to messing with filenames thinking I'd make it more obvious what query they are associated with.


I have a feeling I might be screwed?


I don't think you are screwed.  If you can get a table from the new source that matches the old source you can swap in the M code in the advanced editor then delete all the helper queries added by PowerQuery.

The model only knows what comes out of PowerQuery.  As long as the updated output matches the original output the model won't know the difference.

Certainly save a copy of your .pbix to test on though then give it a try.

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors