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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cheid1977
Advocate I
Advocate 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
Microsoft Employee
Microsoft 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

MattAllington
Community Champion
Community Champion


@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.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
Community Champion


@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.
I will not give you bad advice, even if you unknowingly ask for it.
v-caliao-msft
Microsoft Employee
Microsoft 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
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.