Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JohnT
New Member

Source data with new columns

I'm trying to update a report in Power BI Desktop.

 

I want to update the visualisations, however, the new data source has an additional column on it.

 

The data source is a CSV file.

 

Am I able to replace the source file on the existing report with this new file?

 

When I try to do it, it always gives me an error.  The new column is on the end, so the position of the previous variables has not changed.

 

I also want to use the additional column, so removing it is not an ideal option.  There are no unique ID values, and I don't want to do a join, I just want to change the data source to use the new file.

 

Thanks.

 

6 REPLIES 6
ankitpatira
Community Champion
Community Champion

@JohnT To change source of query simply go to query editor and then under Applied Steps on right hand side, click settings icon for Source and change.

 

Capture.PNG

Thanks for the response, especially with the screenshot.

 

I should have elaborated that that was how I was attempted to change the data source.

 

I was going to edit my original query but have been in meetings, the error message I get is:

 

Failed to save modifications to Server. Error returned: 'OLE DB or ODBC error: Exception from HRSULT: 0X80040E21.'

 

I'm not consciously using on ODBC connection and I don't know what OLE DB is off the top of my head.  When I look up the code, it says that it's got something to do with the data type, however, the data should be identical with the exception of the additional column.

 

That, and it's a CSV file so you cannot really dictate the type.

Eric_Zhang
Microsoft Employee
Microsoft Employee

@JohnT

 

You can change the Power query to replace the source. Do append extra columns in the TransformColumnTypes.

 

Capture.PNG

 

Or as easy as, import the new CSV as a new table, delete the original table and rename the new table. As long as the old column names exists, visuals would show correctly.

I tried adding a table and renaming it previously it didn't work (I also tried again just then too).

 

All the calculations I put in disappeared.

 

Similarly I previously tried changing the source in the Advanced Editor (though I didn't include the new variable with  TransformColumnTypes).  When I tried it again just then this time including the new variable in TransformColumnTypes, it also didn't work.

 

After I do my proof of concept presentation, I might try to replicate this with a small/simple dataset.

 

 

Eric_Zhang
Microsoft Employee
Microsoft Employee

@JohnT

 

I have no idea on the calculations in your case, the approaches actually work with simple dataset in my test.

Vvelarde
Community Champion
Community Champion

hi @JohnT What is error message?




Lima - Peru

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors