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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Sandeep
Helper I
Helper I

Changing connection for pbix file from excel to SQL Azure

HI Team,

We have created few dashboards using existing Excel file. Now as a part of long term strategy we have uploaded the excel data into SQL Azure and automated the process of data refresh.

Now we would like to use the same .pbix file for dashboard from SQL Azure DB by changing the connection string from Excel source to SQL azure connection string.

The Database contains exactly the same column name and table name which was used in Excel.

Could you please help? Please let us know if you need more information.

Thanks
- Sandeep

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

You best bet is to use Advanced Editor in the Desktop. View | Advanced Editor.

 

What I would recommend would be to backup your PBIX file (obviously). Create a new PBIX file and createa a query to to Azure SQL DB for a particularly table. In Query Editor, go to View | Advanced Editor and look at the "Source" line:

 

    Source = Csv.Document(File.Contents("C:\temp\powerbi\pivot.csv"),[Delimiter=",", Encoding=1252]),

That one is for a CSV file. Copy the entire Source line.

 

Now, go into your original PBIX, edit the corresponding query in it, View | Advanced Editor and replace its source line with the one you copied. Save.

 

If everything is the same (big if) then it should work seamlessly.

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks..

I already tried this way but seems it's not working.. I have already replied the to a post on a different thread..

Thanks,
Sandeep

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.