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

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

Reply
Anonymous
Not applicable

How to connect the same report to different database depending on the user's credentials

Hello,

 

As asked in the title i want to connect my report to different database depending of the user.

 

Lets say i have 3 identical Databases (not same data), 1 for each client.

I have built a report that works fine by changing a parameter that contain the database name and refresh the dataset.

I want that change to be dynamic based on the user connecting to the report.

 

How can i do that?

How can i build a report that acces différents database depending of the user ?MBOVIER_0-1672234221705.png

I cant deploy the report for each client because i will have to do it again each time i update the report.

I cant have a single database for all clients.

 

I look like it's the same matter as this post : https://community.powerbi.com/t5/Developer/Switch-dynamically-between-the-databases-depending-on-use...

If i cant change database on the dataset, is it possible to switch dataset depending on the user ?

 

I want to keep data separate and have only one report.

 

Thanks in advance.

 

 

4 REPLIES 4
NandanHegde
Super User
Super User

Hey,

Can you clarify whether the report is Direct Query or import mode?




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
Anonymous
Not applicable

Actually it's Import mode but if there is a solution with Direct Query i can rebuild the report to use it.

Assuming that even though the databases are identical , the data among those databases are not same. Please correct my understanding here.

 

So lets say we have table T1 in all 3 databases with diff set of data, so you need to pull table T1 from all 3 databases in a single PBIX file and then union those tables in a single dataset with a flag bifuracting the data mapping to the tables (the flag can be client names).

 

Then create measures based on the final table and create a role to restrict the data to the specifc client based on the flag column.

 

 

 




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
Anonymous
Not applicable

Correct, databases are identical but the data are not same.

But i dont want to union the tables.

 

I want to change the source database of the dataset based on client name or maybe at least change dataset based on the client name.

 

I want to keep data separate and i want to have only one report.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors