Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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!
Solved! Go to Solution.
Hi @angeloola ,
Based on my test, you could refer to below code in query editor with if parameters:
With my sample, I uesed two excel files, you could switch one to your sql query.
Regards,
Daniel He
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?
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/
Regards,
Daniel He
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:
With my sample, I uesed two excel files, you could switch one to your sql query.
Regards,
Daniel He
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |