Contents
Connecting Power BI to Databases
Databases are widely used to store structured business information. Power BI can connect to supported database systems and retrieve the data required for reporting.
Connecting to SQL Server
Microsoft SQL Server is commonly used in business applications and enterprise reporting environments.
To connect to SQL Server:
- Open Power BI Desktop.
- Select Home → Get data → SQL Server.
- Enter the server name.
- Enter the database name if required.
- Select the appropriate connectivity mode.
- Provide the required authentication details.
- Select the tables or supported database objects you want to use.
- Load the data or open Power Query for transformation.
You must have the necessary database permissions and network access. The server name and authentication method depend on your organization's configuration.
Understanding Database Tables
Imagine a database containing three tables:
- Customers: Customer identifiers, names, and locations.
- Orders: Order identifiers, customer identifiers, and order dates.
- OrderDetails: Product identifiers, quantities, and prices for individual orders.
Power BI can retrieve information from these tables for analysis. In a later module, you will learn how to create relationships between them to support accurate reporting.
Connecting to PostgreSQL
Power BI also supports PostgreSQL through its database connector.
The general workflow is similar:
- Select the PostgreSQL database connector.
- Enter the server address and database name.
- Configure authentication.
- Choose the required tables or data.
- Load or transform the selected data.
Depending on the environment and connector version, you may need an appropriate PostgreSQL driver or additional configuration.
Importing Data vs. Querying a Database
When connecting to a database, Power BI may offer different storage modes, depending on the connector and supported configuration.
With Import mode, data is loaded into the Power BI model. With DirectQuery, supported queries retrieve data from the underlying source when needed.
The choice affects report responsiveness, data freshness, source workload, and modeling capabilities. You will explore these modes in more detail in the next lesson.
Power BI Tutorial
Vishalini A








