cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
majort
New Member

Remove existing DataSource

Hi,

 

if i change a data source for example from one database to another database by editing the M Script, the previous used database connection still exists because when i publish the pbix to powerbi.com then the old database connection i still listed in the data sources.

 

The problem is that i cannot remove this data source and the impact is that i cannot schedule the dataset because of the old database connection (this was only a development database that does not exists anymore).

 

So how can i remove a database connection or data source that is not anymore used by any dataset?

 

thx in advance

1 ACCEPTED SOLUTION

had this same issue when I created a link to a file on a mapped network drive initially, then later changed it to the full network path to the file.

 

Both data connections were showing up when I either published it to PowerBI.com or when I went to PowerBI.com and tried to pull the file instead. 

 

I ended up deleting it from PowerBI.com, re-downloading and installing Personal Gateway, then pulling the file into PowerBI.com using Get Data.

 

Kind of a pain, but it worked. It was a solution offered by a Microsoft employee in another thread.

View solution in original post

14 REPLIES 14
VaishnaviA
Frequent Visitor

Any true solution? I still face the same issue mentioned above. I use PROD and QA Datasource. I however want to remove the QA Data source from cloud and from PBI desktop. Due to this refresh fails and my datasource is on-prem, so I dont need any gateway.

Foram
Frequent Visitor

How to delete one of the data source credentials of sharepoint link from power bi service

 

 

Foram_2-1572431917038.png

i  tried changing data source and clearing the permissions in desktop, but didn't work.

 

 

 

andylitics
Frequent Visitor

We recently moved a SQL server, and I updated the location in Data Source Settings screen succesfully in the query.  Everything works fine when i refresh locally from PBI Desktop.

 

After publishing to Powerbi.com though, similar to the OP, the old data source still shows up in the Data Source Credentials screen, even though i've confirmed my data model doesn't reference it at all.

 

Tried everything outlinded here, I've deleted the data model, uninstalled and reinstalled the personal gateway, and uploaded the data model via both "get data" as well as "publish" and nothing seems to work.

 

Now my refreshes can't be scheduled since it thinks there is still some kind of reference to it, but if there was, how could the file refresh locally with no issue?

 

Any input/suggestions would be appreciated.

Anonymous
Not applicable

Facing the same issue but it only affects some reports.

 

Looks like this happens when you have a query that references another query (that was originally using the old data source).   The referencing query appears to maintain some link to the old source.

 

Workaround:

  1. open report in Power BI
  2. SAVE AS to new report (this step is critical – wont work from the original report)
  3. In Advanced Editor, make some minor change to the query string(s) (I generally use custom SQL in my queries). 
  4. SAVE and SAVE AS to original report name
  5. Publish original report.   Should be ok now.
  6. Edit report to undo minor change and republish.
dipakh
Frequent Visitor

I have been trying for 1 week to get a previous link removed from the datasource.  This workaround works - Yippe


@Anonymous wrote:

Facing the same issue but it only affects some reports.

 

Looks like this happens when you have a query that references another query (that was originally using the old data source).   The referencing query appears to maintain some link to the old source.

 

Workaround:

  1. open report in Power BI
  2. SAVE AS to new report (this step is critical – wont work from the original report)
  3. In Advanced Editor, make some minor change to the query string(s) (I generally use custom SQL in my queries). 
  4. SAVE and SAVE AS to original report name
  5. Publish original report.   Should be ok now.
  6. Edit report to undo minor change and republish.

 

 

Well I didn't do the "save as" trick but I did delete the old report and dataset from Power BI Service, then re-uploaded it again. New version works fine, however I had to recreate permissions (a pain) and I still have the old data sources listed. Even if "save as" works, it still seems like a bad solution because it is effectively a new report. All this to change a file pointer?

 

Please add 'delete' options for data sources to Power BI Service!

Anonymous
Not applicable

True Solution Found!!

  1. Got to Query Editor
  2. Open Data Source Settings
  3. Select the source to be removed
  4. Select "Change Source"
  5. change the source to be the same location as one of your other sources. 
    My situation was one source was a local copy of a Sharepoint file, the other was the sharepoint URL.
  6. Click OK to accept the change. 
  7. Power BI recognised the duplication and removed the duplicate entry. 

I hope this works for you. 

Anonymous
Not applicable

True Solution Found!!

  1. Got to Query Editor
  2. Open Data Source Settings
  3. Select the source to be removed
  4. Select "Change Source"
  5. change the source to be the same location as one of your other sources. 
    My situation was one source was a local copy of a Sharepoint file, the other was the sharepoint URL.
  6. Click OK to accept the change. 
  7. Power BI recognised the duplication and removed the duplicate entry. 

I hope this works for you. 

mmedina
New Member

To get that to work you need to Edit the Queries directly.

In my case I had connection strings in there, I updated them to a valid one.

Then you need to Publish to Power BI from the Desktop app.

Simply uploading the pbix file will not fix the issue.

Greg_Deckler
Super User IV
Super User IV

In Power BI Desktop, File | Options and Settings | Data Source Settings

 

Highlight the data source and hit "Delete"


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The problem is that in the data source settings only 1 connection is listed. When i upload the pbix to the service, 3 connections are listed in the data sets schedule settings.

had this same issue when I created a link to a file on a mapped network drive initially, then later changed it to the full network path to the file.

 

Both data connections were showing up when I either published it to PowerBI.com or when I went to PowerBI.com and tried to pull the file instead. 

 

I ended up deleting it from PowerBI.com, re-downloading and installing Personal Gateway, then pulling the file into PowerBI.com using Get Data.

 

Kind of a pain, but it worked. It was a solution offered by a Microsoft employee in another thread.

View solution in original post

Hi Jeremy, 

 

I hit the same problem.  Can you please share how we can remove the network path from the data source settings.  I selected the path in the data source setting but it only clears the permission.  

So...this is not a solution, this is a workaround.

 

The problem remains that if you delete a datasource from your PowerBI Desktop file, it remains (forever, as far as I can tell) in the upload.  Deleting a dataset and reuploading it is a huge pain when you have a minor dataset tweak (such as moving the dataset to new drive or different folder).  This needs to have a true solution before it is marked as solved.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors