Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Power BI Desktop - How to change data source?

When I'm trying to change my existing data source (Microsoft Azure CosmosDB) to Blob Storage, the Change source is disabled. How do I workaround this?

I have gone through various questions but none of them were similar to mine.
Any help is much appreciated. Thanks enter image description here

like image 669
Dee Avatar asked May 21 '18 03:05

Dee


3 Answers

Workaround

  • Click on edit queries
  • Select the query
  • Advanced Editor

You can change the datasource from here.

Then do apply , export if necessary

like image 173
rinjan Avatar answered Oct 23 '22 13:10

rinjan


Like @rinjan stated above go to the advanced editor on your table in the query editor. Then you will get something like this (This is an Excel connection):

let
Source = Folder.Files("J:\TestPath"),
#"J:\TestPath\Map1 xlsx" = Source{[#"Folder Path"="J:\TestPath\",Name="Map1.xlsx"]}[Content],
#"Imported Excel" = Excel.Workbook(#"J:\TestPath\Map1 xlsx"),
Map1_Sheet = #"Imported Excel"{[Item="Map1",Kind="Sheet"]}[Data],
....and so on

Best way to go here is to copy paste the whole text into the text editor and chose the option replace all with the following line (for this example):

Old value: J:\TestPath
New value: J:\New\Path

If it is not working you have to inspect the lines of codes. Maybe you find the missing piece.

like image 21
Strawberryshrub Avatar answered Oct 23 '22 15:10

Strawberryshrub


The first line of every table must be Source:

https://community.powerbi.com/t5/Community-Blog/Why-can-t-I-change-the-Data-Source-in-Power-BI-disabled-button/ba-p/915365

like image 1
Toni Serrano Avatar answered Oct 23 '22 14:10

Toni Serrano