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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
fraame
Regular Visitor

Write Back To MySQL Database connected with ODBC

Is it possible to make an "INSERT INTO..." query to a MySQL Database connected with PowerBI througth ODBC?

I want to add the data contained into a table in a PowerBI report to a table of my database.

 

Thank you in advance.

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @fraame ,

The write-back function in Power Apps is available to accommodate this. Write-back enables end users to change and update the values in the data warehouse directly from the Power BI report. 

The following article describes in detail how to Write-back into SQL Database using Power BI with Power Apps:

https://visualbi.com/blogs/microsoft/powerbi/write-back-into-sql-database-using-power-bi-with-power-... 

vluwangmsft_0-1655366523974.pngvluwangmsft_1-1655366534544.png

Best Regards

Lucien

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @fraame ,

The write-back function in Power Apps is available to accommodate this. Write-back enables end users to change and update the values in the data warehouse directly from the Power BI report. 

The following article describes in detail how to Write-back into SQL Database using Power BI with Power Apps:

https://visualbi.com/blogs/microsoft/powerbi/write-back-into-sql-database-using-power-bi-with-power-... 

vluwangmsft_0-1655366523974.pngvluwangmsft_1-1655366534544.png

Best Regards

Lucien

v-luwang-msft
Community Support
Community Support

Hi @fraame ,

An example of SQL write back with PQ:

 

let
  Source   = Sql.Database("myserver", "newtest"), 
  emailVal = "2@xyz.com", 
  Custom1  = "INSERT INTO [newtest].[dbo].[Table_1] (Email) VALUES('" & emailVal & "')", 
  Custom2  = Value.NativeQuery(Source, Custom1)
in
  Custom2

 Something like this

 

let
Source = Sql.Database("myserver", "newtest"),
SSAS query = SSAS Q with DAX query,
Val = convert the SSAS query to SQL insert row,
Custom1 = "INSERT INTO [newtest].[dbo].[Table_1] (Email) VALUES('" & Val & "')", Custom2 = Value.NativeQuery(Source, Custom1)
in Custom2

 

 

To learn more details ,refer:

https://community.powerbi.com/t5/Desktop/Writing-Calculated-Visualization-Back-to-SQL-Table/m-p/2245... 

 

Best Regards

Lucien

Word of warning on the Power Query approach - there is a very real chance that these queries will triggered multiple times, or not at all.

lbendlin
Super User
Super User

The general answer at the moment is no - Power BI does not support robust write-backs. You can cheat by using R or Python visuals, but these require the use of a personal gateway.

 

If this is important to you please consider raising it at https://ideas.powerbi.com 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

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.