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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Change data source for visuals

How do I change the data source which is feeding a visual? To clarify, I've learned how to do this:

 

I have visual1 and datasource1 and datasource2. visual1 uses datasource1, so I go into datasource2, click advanced settings, copy the code, so that datasource1 becomes datasource2.

 

But that's not what I want to do. I want to preserve both datasources as they are, and simply point the visual to datasource2.

 

This is such a simple thing and is essential, so I'm sure it can be done easily, but I can't figure out how. Can someone please help?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

 

If you can confirm these query tables has same data structure, you can try to parametrize these query tables' connection string as query parameters.

 

After above operations, you can simply switch datasource by edit on 'query parameter' and 'apply change' to load new data from different data sources.

 

Before change:
visual A -> table1 -> datasource 1 ->connection string parameter 1
visual B -> table2 -> datasource 2 ->connection string paramerter 2

 

Modify parameters:

visual A -> table1 -> data source 2 -> connection string parameter 2
visual B -> table2 -> datasource 1 -> connection srtring paramerter 1

 

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous,

 

If you can confirm these query tables has same data structure, you can try to parametrize these query tables' connection string as query parameters.

 

After above operations, you can simply switch datasource by edit on 'query parameter' and 'apply change' to load new data from different data sources.

 

Before change:
visual A -> table1 -> datasource 1 ->connection string parameter 1
visual B -> table2 -> datasource 2 ->connection string paramerter 2

 

Modify parameters:

visual A -> table1 -> data source 2 -> connection string parameter 2
visual B -> table2 -> datasource 1 -> connection srtring paramerter 1

 

Regards,

Xiaoxin Sheng

MFelix
Super User
Super User

Hi @Anonymous,

 

Not really sure if I understand your question, you refer that you have 2 datasource and want to create the 2 similar visuals with both datasources, then you refer that you do an advance settings and copy the datasource 2 over datasource 1 (this is where I get lost).

Visual don't have advance settings, query's have them.

 

Are you refering to the formatting of the visual? if that is the case you just need to create the two similar visuals fill them with vthe information from their respective datasources, and then use the paint icon to copy the format from one to the other.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thank you for the quick reply! I'll try to describe the situation again, in a similar way:

 

I have visual1, which is "connected to" datasource1.

 

I now have a second datasource - datasource2.

 

All I want to do is have datasource2 now be the source data for visual1, but I don't want to do anything to touch or change datasource1, as I may need it in other places.

 

Basically, I want to change the datasource which is attached to a visual, rather than changing anything about the datasource. This seems so simple, it must be possible?

 

thanks

Alex

Hi @Anonymous,

 

If you want to change the full datasource connected to a visual you need to create a new visual, you cannot have 1 visual and two datasources at will because visuals are based on context and context is given by the datasource.

 

Don't know the full setup of you model, but if those two visual have a dimension table in common that is also used in the visual you can use a switch formula and a filter to change the values on the visual to datasource values 1 or two.

 

But there is no way of changing the datasource without adding a new visual or changing manually the source in the specifi visual.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors