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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
snifer
Post Patron
Post Patron

connection to multiple sql azure database

As per title, my goal is to connect to multiple database SQL on Azure, I wish direct query, is it possible to connect to more database instead of 1? After connection, my goal is to combine the info between the database and displayed on a dashboard.

 

I'm beginner user, thanks for the help!

1 ACCEPTED SOLUTION

@snifer,

You would need to use import mode in Power BI Desktop and create measure to calculate all profilt.

If you persist to use DirectQuery mode, you can create a view that appending all data from these database in Azure SQL, then connect to the view in Power BI Desktop.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@snifer,

"combine the info between the database"

Do you want to merge tables of different databases in a single query? If that is the case, it is not possible to use DirectQuery mode. In DirectQuery mode, all data should come from a single database. To work around this issue, you can consider to create a view in your data source, then connect to the view using DirectQuery in Power BI Desktop.

In addition, the similar thread you post is about how to dynamically change imported table using parameter.


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

what I want is to do is to read tables from the different database on Azure, and then, for example, calculate the net profit for a period from all database.

in specific every database will have a table with a column called profit, so basically, I wanna use the direct query to sum all profit column together from all database. is that possible? if yes can u explain to me how?

many thanks!

@snifer,

You would need to use import mode in Power BI Desktop and create measure to calculate all profilt.

If you persist to use DirectQuery mode, you can create a view that appending all data from these database in Azure SQL, then connect to the view in Power BI Desktop.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

If you persist to use DirectQuery mode, you can create a view that appending all data from these database in Azure SQL, then connect to the view in Power BI Desktop.

thank you so much for help

could u please, if possible send me a link or guide how to do this?

@snifer,

About how to create the view in Azure SQL, you can post question in Azure SQL database forum to get better support.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
snifer
Post Patron
Post Patron

my situation looks pretty similar to this:

http://community.powerbi.com/t5/Desktop/How-to-connect-multiple-database-with-same-table-in-Power-BI...

 

but how to handle it is not very clear to me, can someone explain my step by step from 0 how to connected

 

 

NOTE all my database are hosted on Azure

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors