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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cheid1977
Helper I
Helper I

Changing Source Data From SQL to File Import

I have a Power BI Desktop dashboard that is pulling from an SQL server.  I would like to create another Power BI Desktop dashboard, but pulling from individuals files, not the SQL Server.  To do this I created three files with the same file names found in the SQL Server.  I would like to make a copy of the current dashboard and remap my dashboard to the individual files.  Can I take a dashboard that is mapped to an SQL server and map it to the individual files without impacting the current file structure?     

2 ACCEPTED SOLUTIONS
v-caliao-msft
Employee
Employee

Hi @cheid1977,

 

I have tested it on my local, create a reprot connect to SQL Server database table in Power BI, and then export this table to Microsoft excel, add excel data source in Power BI desktop, I can change the data source from SQL Server to Excel without any issue.

 

So in your scenario, if the data structure are the same in SQL Server and your file, you can change the source.
Capture.PNG

 

Regards,

Charlie Liao

View solution in original post


@cheid1977 wrote:

 Can I take a dashboard that is mapped to an SQL server and map it to the individual files without impacting the current file structure?     


The UI is your friend. Take a look at your sql power query. Go to the source step and hen click forward one at a time until you see the raw table on screen.  Note the step

 

start a new query connecting to Excel and get to the exact same table structure as above. Make sure the last step has the same name as the last step selected above

 

open the second query in the advanced editor and copy from the source step to the last step (excluding in...)

go back to the sql query in advanced editor and prepare to replace the first few steps with your new code. I recommend you do not delete the current first steps but instead comment hem out with // double slash in front of the old rows. Then paste your new code. You may need to add a comma to the last step you paste as it should be missing by default. 

 

Hope that made sense. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2


@cheid1977 wrote:

 Can I take a dashboard that is mapped to an SQL server and map it to the individual files without impacting the current file structure?     


The UI is your friend. Take a look at your sql power query. Go to the source step and hen click forward one at a time until you see the raw table on screen.  Note the step

 

start a new query connecting to Excel and get to the exact same table structure as above. Make sure the last step has the same name as the last step selected above

 

open the second query in the advanced editor and copy from the source step to the last step (excluding in...)

go back to the sql query in advanced editor and prepare to replace the first few steps with your new code. I recommend you do not delete the current first steps but instead comment hem out with // double slash in front of the old rows. Then paste your new code. You may need to add a comma to the last step you paste as it should be missing by default. 

 

Hope that made sense. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
v-caliao-msft
Employee
Employee

Hi @cheid1977,

 

I have tested it on my local, create a reprot connect to SQL Server database table in Power BI, and then export this table to Microsoft excel, add excel data source in Power BI desktop, I can change the data source from SQL Server to Excel without any issue.

 

So in your scenario, if the data structure are the same in SQL Server and your file, you can change the source.
Capture.PNG

 

Regards,

Charlie Liao

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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