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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Cant edit Data source after import from Excel

Hi

I've imported an Excel file/Power Pivot modul to Power BI Desktop.

Under Data Source Settings the source string is grayed out - where can I edit it?

Regards, Henrik

6 REPLIES 6
Peter_Almhult
New Member

Hi!

   

6 years too late, but if someone else is looking for the answer to this question or if Microsoft is listening to its customers... It seems that when you import the workbook via import Power Query (to get queries and data model etc.) Power Bi creates a direct source (file reference and table reference in one line of code/one execution) for all the queries. The first step/line of code/execution in a query needs to be the file reference only to be able to change the data source via change data source in Power Bi main window or via the cogwheel in the query for that table.

  

A workaround is to go in to advanced editor and edit the code so that you first have one step with the file reference and then another step to select the original table in the Excel file that was used in the query in the excel file. I create another Power Bi report and import the data through import data from Excel and select my tables to get these two steps. Then check for subsequent errors in the queries below and edit some more…

 

It would be great if Power Bi just added these two steps in the query when importing Excel queries/models so that we can change the excel file reference through the data source settings in Power Bi directly. Angela are you with me?

  

Best regards

Peter

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

You import the Power Pivot model the way below, right? If it is, there is some limitations about import excel workbook contents, please review the limitation part of this article: Import Excel workbooks into Power BI Desktop.

2.PNG

Or you import data from excel by clicking "Get Data"->Excel, you have access to all the datasouce settings in excel? And what power Bi desktop do you use, please update it to the latest version.

Best Regards,
Angelia

Anonymous
Not applicable

Hi Angelina

 

I import the Excel workbook via Import > Excell workbook contents

The importet Data model, created in Power Pivot, works fine in Power BI Desktop, but the connection string is grayed out under Data source settings.

 

I need to edit the connection string, as I intend to use the pbix-file on various customers sql server.

 

Help is much appriciated.

 

Regards, Henrik

Anonymous
Not applicable

Hi @v-huizhn-msft

Any ideas?

Regards, Henrik

Hi @Anonymous,

In Excel, as what I said, if you have access to edit data source permission in excel as follows?

1.PNG

Best Regards,
Angelia

Anonymous
Not applicable

Hi @v-huizhn-msft
 
Oh, I am able to edit the data connection in Excel, but:
 
After importing the - big - datamodel in Power BI Desktop, I build a lot of visuals in Power BI Desktop, and then I want to reuse this bpix-file at various customers sql servers. If I have to edit the data source in Excel, then I have to rebuilt the - many - visuals in Power BI every time.
 
Is it impossible to edit the data source in Power BI desktop?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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