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

Don'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.

Reply
ErikTavares
New Member

OBCD Connection validation error

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? 

1 REPLY 1
lbendlin
Super User
Super User

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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.