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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jgowda
New Member

Changing Data Source

It is possible to adjust the data source of a power BI report from any level higher than Power BI Desktop? Can I change the source from when a report is published or published to web? Is there any way to adjust what data source my report pulls from based on some parameters when the report is opened, either on app.powerbi or on publish to web?

 

Thanks

Jethin

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @jgowda,

 

Based on my test, We cannot change data source of a report from Power BI service. Here we can use parameter to change data source.

Then we can get data using the Parameter that we created. In power query we can get different data of different data sources by changing the Current value.For more details, please check the online document.

 

1.png2.png22.png

 

Here is the M code for your reference.

let

    Source = Sql.Databases(Parameter1),

    Power_BI_Test = Source{[Name="databasename"]}[Data],

    dbo_Financial_1 = databasename {[Schema="dbo",Item="Financial_1"]}[Data]

in

    dbo_Financial_1

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Hi @jgowda,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @jgowda,

 

Based on my test, We cannot change data source of a report from Power BI service. Here we can use parameter to change data source.

Then we can get data using the Parameter that we created. In power query we can get different data of different data sources by changing the Current value.For more details, please check the online document.

 

1.png2.png22.png

 

Here is the M code for your reference.

let

    Source = Sql.Databases(Parameter1),

    Power_BI_Test = Source{[Name="databasename"]}[Data],

    dbo_Financial_1 = databasename {[Schema="dbo",Item="Financial_1"]}[Data]

in

    dbo_Financial_1

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi Chnage server name via parameter is I am able to do but I can't change the Schema name. Could you please help me on this? Please see my question here: https://community.powerbi.com/t5/Desktop/Schema-change-to-multiple-queries-SAP-hana-and-Direct-query...

Hi @jgowda,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
jgowda
New Member

It is possible to adjust the data source of a power BI report from any level higher than Power BI Desktop? Can I change the source from when a report is published or published to web? Is there any way to adjust what data source my report pulls from based on some parameters when the report is opened, either on app.powerbi or on publish to web?

 

Thanks

Jethin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors