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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
We would like to provide our users with a generic dashboard (pbix file) that can be used with their database (all our customer databases run on the same SQL Server but each customer of course has their own, different database login credentials)
We experimented with changing query settings in Power Query part of PBI Desktop. Apart from encountering a few issues there (user credentials weren't accepted although entered correctly) our users are not technical we would like to make this easier e,g, also avoiding that this has to be done for every table queried.
Is there a way to programatically access the power query script (accessible via advanced editor) to change query detail e.g. db name? Are there other ways to query user credentials and database detail on open and apply that to dashboard?
Would really appreciate your feedback on what's the best approach to making the dashboard file available so that users only have to enter their credentials and point to their database in the list (from the ones that their db user has access to) and the dashboard refreshes.
Thanks!
Martin
I have experimented some more and come again across the problem that my credentials are rejected although they are 100% correct. I have created a Power Bi query script with the variable for the database name (blank query with the string for the database as proposed by Chris Webb: http://blog.crossjoin.co.uk/2015/11/09/avoiding-duplication-of-database-connection-information-in-po... and the query for the table:
let
Source = Sql.Database("servername",Databasename),
dbo_VW_InvoicesAndCredits = Source{[Schema="dbo",Item="VW_InvoicesAndCredits"]}[Data]
in
dbo_VW_InvoicesAndCredits("servername" on our end uses the real server name)
After that I am queried for user name and password which I enter correctly but it gets always rejected (on a new query it works perfectly). I am really getting to the end of my patience this seems to be an error in Power BI Desktop???
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |