Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi,
Say you have a sql server with several databases within, one database for each customer/client. These databases have the same tables, same structure etc. How would go about developing a report which extracts the same query from every databases and uses the data as one data source, knowing the number of databases might change periodically, new customers/customers leaving ?
I know this a large question, let me see if I can break it up:
I hope my questions are clear and consice, any help would be appreciated.
Thank you.
First, I would wonder why you have a single database for each customer instead of one database with a field for customer to differentiate between them.
But...you should be able to access them individually using Power Query by using each database as a data source. Add a field for customer to each table pulled from each database so that when you merge each query together you can still tell which customer the data applies to. I don't believe that you can loop through them in Power Query, but someone who is stronger in that can offer guidance.
But again, your underlying is that you shouldn't be using separate databases for each customer...that is just creating problems for yourself.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 24 | |
| 24 | |
| 18 |
| User | Count |
|---|---|
| 54 | |
| 50 | |
| 41 | |
| 33 | |
| 23 |