Forum Discussion
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
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.
24 Replies
- Greg_DecklerCommunity Champion
In Power BI Desktop, File | Options and Settings | Data Source Settings
Highlight the data source and hit "Delete"
- majortNew Member
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.
- jeremyfirthAdvocate II
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.
- samsfebNew Member
Hi Everyone,
I found one solution.
Go to PowerBI Desktop->Home->Transform data-> Data source Settings.
Once the Data source settings Dialog opened.
select Data sources in current file Radio Button. select each data source that you want to remove and click on change Source button at the bottom, then update the settings as per the required data source and update then automatically powerbi removes the duplicate data sources. Finally you left with one datasource that is required for you. If this resolves your solution then click on Accepted Solution.
Thanks Everyone
- SDittmannFleetAdvocate IV
That is the only thing that worked for me.
- ForamFrequent Visitor
How to delete one of the data source credentials of sharepoint link from power bi service
i tried changing data source and clearing the permissions in desktop, but didn't work.
- catiewilliams17Advocate I
I was facing the same issue as the OP - and didn't want to break the URL that a lot of our users have bookmarked by deleting and re-publishing. I also couldn't see the additional source anymore in Transform Data > Data Source Settings so changing the source wasn't a viable option. What I tried instead was going to File > Options > Data Load > Data Cache Management Options and I cleared the cache and republished. This removed my extra source that was no longer valid and causing refresh failures.
- DoubleJSolution Supplier
thanks, that worked for me!
- mmedinaNew 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.
- andyliticsRegular 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.
- AnonymousNot 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:
- open report in Power BI
- SAVE AS to new report (this step is critical – wont work from the original report)
- In Advanced Editor, make some minor change to the query string(s) (I generally use custom SQL in my queries).
- SAVE and SAVE AS to original report name
- Publish original report. Should be ok now.
- Edit report to undo minor change and republish.
- AnonymousNot applicable
True Solution Found!!
- Got to Query Editor
- Open Data Source Settings
- Select the source to be removed
- Select "Change Source"
- 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. - Click OK to accept the change.
- Power BI recognised the duplication and removed the duplicate entry.
I hope this works for you.
- AnonymousNot applicable
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.
- RahulNadkarniFrequent Visitor
Deleting the tables related to that data source and recreating is the only solution. Option to change the data source should be provided.
- TribunalRegular Visitor
For future readers, the way I get rid of some data sources is to delete them from the Data pane. Find the table that belongs to the data source, right-click, and select Delete From Model. When I did this, I saved and closed/reopened. The data source was gone from my list after that.
That was just for one table that linked to one Excel document using a Web data source, so not sure if it will work for more complex models.