The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone!
I have an interesting challenge I'm hoping to get some guidance on. I have a Power BI report currently connected to a SQL Server database. I also maintain an Excel file that contains a mapping of different locations to their corresponding server details (server names, etc.).
What I'm trying to achieve:
Additionally, I'd like to understand:
Is this kind of dynamic connection switching possible in Power BI? If yes, what would be the best approach to implement this?
Thank You.
Solved! Go to Solution.
@Sujith_00 Dynamic db connection is not an issue, the only challenge here is that the connection needs to switch based on the selection made by the user. The only thing I can think of is to use dynamic M parameters which will pass the location to PQ and then further logic will change the connection. Read more about dynamic M parameters here Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
The only other way or a more scalable way I can think of, combine data from all the sources (SQL databases) and add a location column to the data, and based on the slicer, it will filter data for the specific location. This is a more practical solution. But it also depends on the size of data if you have to combine it form the all the SQL servers.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Sujith_00 Dynamic db connection is not an issue, the only challenge here is that the connection needs to switch based on the selection made by the user. The only thing I can think of is to use dynamic M parameters which will pass the location to PQ and then further logic will change the connection. Read more about dynamic M parameters here Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn
The only other way or a more scalable way I can think of, combine data from all the sources (SQL databases) and add a location column to the data, and based on the slicer, it will filter data for the specific location. This is a more practical solution. But it also depends on the size of data if you have to combine it form the all the SQL servers.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.