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!

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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