cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DavidCather Frequent Visitor
Frequent Visitor

Replace a data source for an Existing report where the new data source has different fields

So similar to the question here I have a PowerBi Dashboard with an Excel spreadsheet as the data source ExcelFilev0.4.xlsx I want to redirect the dashboard to point to ExcelFilev0.5.xlsx, but here I have a problem, some of the columns in excel have been removed between v0.4 and v0.5.  They weren't doing anything and it seemed neater to remove them.

 

How can I tell PowerBi that the columns no longer exist and that that's fine because we didn't need them anyway?

 

Thanks.

 

David

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Replace a data source for an Existing report where the new data source has different fields

I assume the problem you're seeing is that when you import, the Query Editor is giving alerts about those columns not existing?

The easiest way to fix this is to go into the Query Editor, replace your source table, and press the Advanced Editor button.  This will bring up the entire list of code used to transform that table.  Look near the top, and there's probably a line that starts with #"Changed Type".  Go through that line, and remove the bracketed sections that include columns that you've removed.   

 

If you didn't use the columns in any of the rest of the transformations, you should be able to hit Done and go on your merry way.  If the query editor still gives you similar "The column 'name' of the table wasn't found." style error messages, look through the rest of the code in that advanced editor, and continue removing references to the removed columns. 

 

Once the code no longer references those columns, you should be all set!

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Replace a data source for an Existing report where the new data source has different fields

I assume the problem you're seeing is that when you import, the Query Editor is giving alerts about those columns not existing?

The easiest way to fix this is to go into the Query Editor, replace your source table, and press the Advanced Editor button.  This will bring up the entire list of code used to transform that table.  Look near the top, and there's probably a line that starts with #"Changed Type".  Go through that line, and remove the bracketed sections that include columns that you've removed.   

 

If you didn't use the columns in any of the rest of the transformations, you should be able to hit Done and go on your merry way.  If the query editor still gives you similar "The column 'name' of the table wasn't found." style error messages, look through the rest of the code in that advanced editor, and continue removing references to the removed columns. 

 

Once the code no longer references those columns, you should be all set!

View solution in original post

DavidCather Frequent Visitor
Frequent Visitor

Re: Replace a data source for an Existing report where the new data source has different fields

Thanks, that has worked, the advanced editor code looked quite short because it doesn't word-wrap, but when I pasted in into a text editor and searched I was able to find the fields causing the errors and remove them.

 

Sorry for the slow reply, I've been working on the Excel side of my project and only got back to PowerBi today.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 1,037 guests
Please welcome our newest community members: