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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power BI shared connection library

Hi,

still a newbie toPower BI. Is there any way to create a connection object that contains the database details, username,pwd that can then be shared /used with many reports ? If I change my data source I want to only update one connection object and my many reports would switch over....

 

Thanks

1 ACCEPTED SOLUTION

Hello @Anonymous 

 

the login data is stored in the profile. So there is only the need to maintain it once.


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

5 REPLIES 5
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

the connection details as ID/Password can't be hardcoded in a M-Query. They will be stored on your profile, when you execute the query and therefore not be passed in the file.

 

Hope it helps

 

Jimmy

Anonymous
Not applicable

thanks Jimmy,

still confused here, probably need to do some more playing around on this. If I want to use a generic Db account and could be connecting to any type of Db (Oracle, Netezza, Greenplum...) where would these details be stored, not sure where this 'profile' you mention sits.

 

Just as background, I stood up a Windows VM with SQL Server and installed Power BI just to get a flavour of this tool and compare with Qlik, OBIEE, Bus Objects....all these tools can hold connection detail outside of a report and are simply referenced.

 

Thanks

Hello @Anonymous 

 

Power Query - alias M - is a functional programming language. Therefore there are available for a lot of data sources different functions, that require parameters, like server or whatever. For some data sources is possible to maintain queries in SQL/MDX/DAX and other additional information. This all you can hardcode. However, IDs or passwords can not be hardcoded. They have to be set up by the different user, refreshing the query. 

 

Hope now is clearer

 

Jimmy

Anonymous
Not applicable

Thanks,

think I'm getting the idea. I asume taht if I create a report against an Oracle Db and share the Power BI file, when they chose to refresh the data it will prompt them for username.pwd. Will that be saved somewhere or will it always prompt on each refresh ?

 

Also reading up about PBID files ...

 

Appreciate this.

Hello @Anonymous 

 

the login data is stored in the profile. So there is only the need to maintain it once.


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.