The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
In the system I'm working with, there are three environments(server) for SQL databases, Dev, Test and Prod and the same SQL tables and views in all environments. I've created some reports in PBI Desktop with connection to Dev.
There is no Analysis- or Reporting Services, just PBI Desktop and connection to SQL databases. In the reports I've created in Dev, if I want to connect to Test or Prod environment, the SQL views would be added to the list of views I have already from Dev in my report. How can I connect to other environments without adding SQL views?
Solved! Go to Solution.
I resolved the issue by adding the data source in Data source setting.
File ->Options and setting -> Data source setting -> and there added other data sources to the list and it works to select other DB servers.
I resolved the issue by adding the data source in Data source setting.
File ->Options and setting -> Data source setting -> and there added other data sources to the list and it works to select other DB servers.
Hi @Trodo737 ,
You can use parameters to connect to different environments in the same report. The Below are the steps you can take to connect using parameters
Create Parameters:
Use Parameters in Queries:
let
Source = Sql.Database(ServerName, DatabaseName)
in
Source
Apply Parameters:
You can try the above steps to setup connection using parameters.
You can then use the parameter in slicer and try changing the value and see if it works with new connection
Regards,
Thank you @Thejeswar . I'm using the new version of PBI Desktop and it seems that the new one doesn't have this option anymore(for creating parameters for datasources https://www.phdata.io/blog/how-to-parameterize-data-sources-power-bi/). I found 'New parameters' under 'Modeling' but there is only option for numeric and field.