cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
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

Highlighted

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
Highlighted
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

Highlighted
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

Highlighted

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

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors