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.

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
Anonymous

I tried to see if this was my case but indeed all my queries start with Source. Do you know about any other reason that disable the button?

Same issue as Icordovab, source is the first step in all my queries, always allow parameters is checked, but the "Change Source..." button is greyed out.

What am I missing?

If you have parameterised any part of your Source, then the button will be disabled.  We parameterise the database name so we can easily switch from UAT to PROD but doing this disables the button.

Hi,

I'm struggling to understand the steps over here. can you please write down step by step process over here. I'm very much new to Power BI and i'm getting little confused by the screenshots.

Thanks.

Anonymous

Hi,

I am unable to change the source for the JSON data as shown below.

I checked there are no parameters attached to this source,kindly advise.

TAJ_0-1675216538667.png

 

Anonymous

Hi,

 

Taj image which you share shows that your Dataset is within report, you will be seeing matrix grid (Data) sign between report and Model view.

 

You can change the datasource when you have a separate report connected to the separate dataset.

 

Thanks.

Yasir 

Hello,

 

But still, how can we change the datasource when the button is greyed out ?

Found the article below, but no time to test it yet.

How To Change The Data Source In Power BI? - Addend Analytics