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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

change data connection from database to API

I connected data from database with SQL by ODBC, now as the policy reason the ODBC connection method should change to get data from API, as I had created lots of reports use original data, how can I change the connection method from ODBC to API?

null_0-1653295101070.png

 

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

Hi @Anonymous ,

 

Please try using XMLA endpoints to change data sources of Power BI dataset.

 

Using XMLA endpoints to change data sources in a Power BI dataset 

 

This is my test steps to change the SharePoint Online data source to a local SQL Server data source using Tabular Editor on Power BI Service.


1. Open a Tabular Model from an existing database (Ctrl+Shift+O). The server name is the URL of your PPU/Premium workspace, and then log in with your Power BI account.

 

vkkfmsft_0-1653548208318.png

 

2. Find the partition of the table and you can see that the partition’s M expression shows that the dataset comes from an Excel file on SharePoint Online.

vkkfmsft_1-1653548208769.png


3. Then you need to change the partition’s M expression to SQL Server data source as the following example. Save the changes to the dataset.

 

vkkfmsft_2-1653548208681.png


4. Configure the credentials of the new data source for this dataset on Power BI Service and refresh the dataset.

 

Note that it is important to ensure that the structure (including table name, column names) of the table imported from the new data source and the old data source are the same, so as to ensure a successful refresh after modifying the data source.

 


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try using XMLA endpoints to change data sources of Power BI dataset.

 

Using XMLA endpoints to change data sources in a Power BI dataset 

 

This is my test steps to change the SharePoint Online data source to a local SQL Server data source using Tabular Editor on Power BI Service.


1. Open a Tabular Model from an existing database (Ctrl+Shift+O). The server name is the URL of your PPU/Premium workspace, and then log in with your Power BI account.

 

vkkfmsft_0-1653548208318.png

 

2. Find the partition of the table and you can see that the partition’s M expression shows that the dataset comes from an Excel file on SharePoint Online.

vkkfmsft_1-1653548208769.png


3. Then you need to change the partition’s M expression to SQL Server data source as the following example. Save the changes to the dataset.

 

vkkfmsft_2-1653548208681.png


4. Configure the credentials of the new data source for this dataset on Power BI Service and refresh the dataset.

 

Note that it is important to ensure that the structure (including table name, column names) of the table imported from the new data source and the old data source are the same, so as to ensure a successful refresh after modifying the data source.

 


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Little bit tricky, when it across different type of connection

Change Connection from One source type to another Source Type: https://youtu.be/nwYJgG2hmd0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.