Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Guys,
I'm using a PowerBi destop to develop a dashboard, my company uses a ci/cd process where there is four environments, DSV, TST, HMG e PRD. In PRD the painel uses a dataflow to get data from database, and the others it uses ODBC query. Thinking about this, we add a code in query to use a parameter on Power Query Editor to choose the connection.
result = if fonte == 'dataflow'
let
//dataflow query
in
else
let
//odbc query
in
where fonte is a parameter that receive the connection name.
In local desktop it works very good, but in the workspace, it returns an gateway error, probabilly because PowerBI try to validate both of connections, odbc and dataflow. But odbc connection is not acessible on workspace without a gateway, end then it not update anything, dataflow or odbc. Even though, the parameter is dataflow and only dataflow connection will be used.
What can be done?
You must connect to both sources in all environments. Then your switch can feed a secondary query with the desired output of one or the other query.
You cannot switch connections dynamically, and even more so if the connection type is different.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
20 | |
10 | |
10 | |
10 |