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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Changing data source with another structure

Hi guys!

 

I have a Pbix file connected via Direct Query to DataBase "A" (SQL DataBase) .

Let's say (to simplify) that DataBase "A" has just a table with 20 columns and just 14 of its colums are used in the model (measures, visualization,...) the others 6 colums are not being used.

 

The thing is when I try to "Transform Data -> Data source Settings -> Change source" and try to connect this Pbix file to another SQL Database with 21 columns (ALMOST the same structure) , I have an error and cannot see any data.

 

Why I need this? I'm working in a company that usually add new fields in some tables (for example, a new field in the Customer Table) and I'm cooking some reports and I realized that when IT guy creates a new field, I cannot connect the file as usual. What I'm doing now is rebuild the report again, it's a mess!

 

Thank your for reading this and thank your for your help!

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

parameters are also available in direct query mode.

I recommend to activate this option.

ParameterOption.png

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

5 REPLIES 5
az38
Community Champion
Community Champion

Hi @Anonymous 

why dont you just describe only these useful 14 fields in the SELECT..from SQL-statement?

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

I always change the connection string in the Power Query editor.

We have parameterized them in our templates.

To reduce the points of change, I use the "One Data Source" approach.

https://powerpivotpro.com/2017/05/power-query-magic-part-1-always-good-references/

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Thank you for your answer @mwegener

 

Unfortunately It seems it's not available in DirectQuery mode connection. (It's really interesting for importation mode, though)

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

parameters are also available in direct query mode.

I recommend to activate this option.

ParameterOption.png

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Priceless help. Thank you, it was just what I needed!

 

I'm not advanced PowerBI user, trying to improve my skills day after day. Thank you!

 

 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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