Forum Discussion
Anonymous
5 years agoNot applicable
Creating a generic data source for a PQ query
Hi, for a customer I need to manage the data loading from a SQL Server table in the dev environment and the data loading from the corresponding Oracle table in the prod environment. In other terms, ...
- 5 years ago
Please see this article. You should be able to adapt this approach.
Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD
Pat
mahoneypat
Microsoft Employee
5 years agoThere are several ways you could do this. One simple one would be like this. Just change the SourceToggle value away from 1 to change to prod.
let
SourceToggle = 1,
Source = if SourceToggle = 1 then Sql.Database( ) else Oracle.Database( ),
rest of query
Pat
Anonymous
5 years agoNot applicable
Hi Pat,
thanks for your reply.
I've tried your suggest in pbi desktop and it functions rightly!
On power bi service after the publishing?
I'm interesting to know other ways to solve this issue. Is there any articles about this subject?