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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
angeloola
Helper I
Helper I

Use parameter to change data connection types (e.g. Denodo to SQL Server)

So, I've seen tutorials that show how to use parameters to switch between server instances or databases on a server, or to change Excel file paths. They are always using the same source TYPE, however.

 

My question is, how to I use parameters to change between completely different data sources? For my particular example, I have a set of views in Denodo that I'm connecting to PowerBI for test. Once I've built a working POC in PowerBI, I push those same tables into Azure SQL instance and reconnect my report to that source. It's tedious at the moment and I want to make it simple. I think it should be possible using parameters. 

 

Can someone demonstrate how do I use source parameters to easily switch between those comletely different data sources?

 

Thanks!

1 ACCEPTED SOLUTION

Hi @angeloola ,

Based on my test, you could refer to below code in query editor with if parameters:

1.PNG

With my sample, I uesed two excel files, you could switch one to your sql query.

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
angeloola
Helper I
Helper I

That's awesome! Thanks @v-danhe-msft ! Can I specify my sources in that parameter using a list (e.g. "SQL" "Denodo"? Or, does it only work with a number?

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @angeloola ,

You could refer to below blog about how to switch the datasource for your data model:

https://biinsight.com/power-bi-desktop-query-parameters-part-1/

1.PNG

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, sure I found that one. It's only toggling between two different instances of a SQL Server connection. I'm looking at how I could possibly toggle the connection TYPE (e.g. from a SQL connection to a Denodo or Excel). If you know of any examples of this I'd love to see them.

 

I spent a lot of time on this forum looking for and answer because there's loads of great solutions here. I wasn't able to find a solution for my specific problem... Any other suggestions would be much appreciated. At this point I'm still stuck on this one.

 

-A

 

 

Hi @angeloola ,

Based on my test, you could refer to below code in query editor with if parameters:

1.PNG

With my sample, I uesed two excel files, you could switch one to your sql query.

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.