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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
powerbiexpert22
Impactful Individual
Impactful Individual

Error while refreshing the pbix file

i have change the datasource from sql server to snowflake in the advance editor and i am able to see data populated in tables in Power BI however I am still getting error when i click on apply changes as shown below . please see below screenshots . 

 

when i refresh the report , it is still showing sql server name as shown below

 

powerbiexpert22_3-1751869346541.png

 

 

powerbiexpert22_0-1751869230059.png

 

 

 

powerbiexpert22_2-1751869283695.png

 

powerbiexpert22_4-1751869429741.png

powerbiexpert22_5-1751869529246.png

 

powerbiexpert22_6-1751869568718.png

powerbiexpert22_0-1751869719233.png

 

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @powerbiexpert22 , Thank you for reaching out to the Microsoft Community Forum.

 

Power BI Desktop retains internal metadata and credential references from the original SQL Server connection even if you've replaced the M code. Changing the source in the Advanced Editor only updates the logic inside that specific query. It doesn’t remove Power BI's stored reference to the original SQL Server connector, which lives in the model and credential store. If any query, parameter or even a disabled step still contains a call to Sql.Database, Power BI will continue treating SQL Server as part of your model. This is why you're seeing credential prompts for a server you're no longer intentionally using.

 

To fix this fully, open every query, including any parameters, helper queries or functions and search for Sql.Database. If you find any, remove or replace them with the correct Snowflake call, typically using Snowflake.Databases(...) or Odbc.DataSource(...) depending on how you’re connecting. Then go to File -> Options and settings -> Data source settings, find the SQL Server reference, and clear its permissions. That breaks Power BI’s link to the old source and stops the prompt.

 

Manage data source settings and permissions (Power Query) - Microsoft Support

How to Change the Data Source in Power BI Service - Microsoft Fabric Community

Data sources in Power BI Desktop - Power BI | Microsoft Learn

 

If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

3 REPLIES 3
v-hashadapu
Community Support
Community Support

Hi @powerbiexpert22 , Thank you for reaching out to the Microsoft Community Forum.

 

Power BI Desktop retains internal metadata and credential references from the original SQL Server connection even if you've replaced the M code. Changing the source in the Advanced Editor only updates the logic inside that specific query. It doesn’t remove Power BI's stored reference to the original SQL Server connector, which lives in the model and credential store. If any query, parameter or even a disabled step still contains a call to Sql.Database, Power BI will continue treating SQL Server as part of your model. This is why you're seeing credential prompts for a server you're no longer intentionally using.

 

To fix this fully, open every query, including any parameters, helper queries or functions and search for Sql.Database. If you find any, remove or replace them with the correct Snowflake call, typically using Snowflake.Databases(...) or Odbc.DataSource(...) depending on how you’re connecting. Then go to File -> Options and settings -> Data source settings, find the SQL Server reference, and clear its permissions. That breaks Power BI’s link to the old source and stops the prompt.

 

Manage data source settings and permissions (Power Query) - Microsoft Support

How to Change the Data Source in Power BI Service - Microsoft Fabric Community

Data sources in Power BI Desktop - Power BI | Microsoft Learn

 

If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Hi @v-hashadapu ,

i changed the connection of one query in advanced editor and it is working now

Stiffi88
Frequent Visitor

Hi powerbiexpert22,

try to use this connector instead:

Stiffi88_0-1751877847367.png

 

After this is working you can use the connection string and change yous with the new one in the advanced connection settings.

 

KR
Clemens

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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