Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
468 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Swapping data source and table name without error |
---|
Swapping data source and table name without error |
In Power BI I have an existing data model which contains a table called Purchase. The report contains multiple visualisations which display columns from the Purchase table.
This table visual uses columns from the Purchase table.
The problem is that the original source table no longer exists and the new source table and its columns have different names.
The new data source column headers are different to the original.
When data sources change we can't just delete the old table and pull in the new one (because it will break all of the visuals which refer to it). The rest of this blog explains how to successfully replace a table which is already being in visuals, hopefully without breaking anything!
When you delete a table any measures created in it will also be deleted, we need to move the measures to avoid this.
To do this, select a measure then from the ribbon choose Home | Measure tools | Home table and choose a different table from the dropdown.
Consider creating a specific table to store all your measures.
Now we can rename the old table and column names to match those of the new source table.
In the Data pane update your column names to exactly match the column names in the new data source.
Characters like spaces matter!
Now repeat this for the table name making sure the characters and case are the same in both data sources.
This process IS case sensitive.
We can now move to the Query Editor and set up the new data source connections.
From the ribbon choose Home | Transform data and select Transform data from the drop down.
This opens the Query Editor.
In the Queries panel, right-click on the old table and choose Delete to remove it.
There is no undo button so double check you delete the right table!
Now you can import the new table into your data source as normal.
Here I am importing from an Excel sheet.
Power BI will add the new table to the bottom of the Queries pane.
This name should be identical to the renamed old table.
Select Home | Close & Apply from the ribbon to import your updated table.
There is no going back now!
Power BI will now replace the old table with the new one and, if everything matches, there should be no error signs.
This is much faster than having to recreate all the visuals and calculations from scratch!
Some other pages relevant to the above blog include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2025. All Rights Reserved.