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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

g_datasense

Why can't I change the Data Source in Power BI (disabled button)?

title.png

 Change Source in Power BI Desktop is disabled

 

Changing a Data Source connection in Power BI Desktop is very simple, just two or three clicks, as you can see in these two very simple methods:

 

article_pwbi_1.png

 

Although it is a simple step to change the connection of a Data Source in Power BI Desktop, sometimes we face a problem that makes this change difficult, when the option button [Change Source ...] is disabled, which forces us to change manually within the Power Query Advanced Editor.

 

article_pwbi_2.png

 

So, first we need to understand the logic that Power BI uses and why this option appears disabled. Everything happens within Power Query, as you can see, the first step we cannot exclude, precisely because Power BI understands that every first step of each query will be the Data Source. That is, if we start a query creating a variable instead of starting with the connection to the Data Source, the option to change the Data Source in the simple way you saw at the beginning of this article will be automatically disabled.

 

article_pwbi_3.png

 

Conclusion:

 

What can we do to fix this problem? We need to create these variables in a separate query, so we can use these variables in any other Query and at any step of it, but not in the first, as you can see in the image below. Also, it is a good practice of queries organization.

 

article_pwbi_4.png

 

 

So, the first step of Query will always be the Data Source and you will always have the option button to change the Data Source activated, because Power BI will always find your first stage of Query your Data Source.

 

article_pwbi_50.png

 

Thank you for reading and give your feedback. 🙂

 

Comments