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
Rahul_SC
Helper IV
Helper IV

how load data to SQL database from power query

Hi all,

 

I have a raw table where I apply transformation steps using power query. The end output, I want to load data directly to SQL database not in my excel file. The need is everytime when raw data is updated then the end output should go into database and store the data.

 

how to build this connection ?

2 ACCEPTED SOLUTIONS
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

These two videos, from same author, illustrate how you can write back your data in SQL Server from PQ

https://www.youtube.com/watch?v=UFD5S4Peqc4

https://www.youtube.com/watch?v=WgIhsF7kEjI 

View solution in original post

v-jingzhang
Community Support
Community Support

Hi @Rahul_SC 

 

If you want to export data from Power BI Desktop into a SQL Server database manually, you can use DAX Studio. After you install it, it will appear in your Power BI Desktop as an external tool.  

 

If you want to export data automatically after transformation, you can try Python or R methods as below. Publish the pbix file to Power BI service and set a scheduled refresh for this dataset. To use Python or R, it requires the personal-mode on-premises data gateway. 

Exporting Power BI Desktop data to SQL Server using Python | Sandeep Pawar | PawarBI.com 

Exporting Power BI Data to SQL Server 

 

And this video may also be helpful: 

Export Filtered Dataset from Power BI to SQL Server Programmatically using API and Power BI Embedded 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
Rahul_SC
Helper IV
Helper IV

@Vijay_A_Verma  this helps. thanks!

 

@v-jingzhang, thanks for the links, learnt new things. 

v-jingzhang
Community Support
Community Support

Hi @Rahul_SC 

 

If you want to export data from Power BI Desktop into a SQL Server database manually, you can use DAX Studio. After you install it, it will appear in your Power BI Desktop as an external tool.  

 

If you want to export data automatically after transformation, you can try Python or R methods as below. Publish the pbix file to Power BI service and set a scheduled refresh for this dataset. To use Python or R, it requires the personal-mode on-premises data gateway. 

Exporting Power BI Desktop data to SQL Server using Python | Sandeep Pawar | PawarBI.com 

Exporting Power BI Data to SQL Server 

 

And this video may also be helpful: 

Export Filtered Dataset from Power BI to SQL Server Programmatically using API and Power BI Embedded 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

These two videos, from same author, illustrate how you can write back your data in SQL Server from PQ

https://www.youtube.com/watch?v=UFD5S4Peqc4

https://www.youtube.com/watch?v=WgIhsF7kEjI 

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.

Top Solution Authors