Load Multiple Tables
Power BI · Getting Data
Theory
Power BI gives you several ways to pull more than one table from a source like SQL Server at once, and picking the right one keeps your model clean and your reports fast. The three main approaches are: multi-selecting tables in the Navigator window, writing a custom SQL statement to shape exactly what comes back, or selecting an entire database in one go, which works but is rarely a good idea.
For the sample model you would tick dbo.Sales, dbo.Customers and dbo.Products in the Navigator, click Transform data to remove unused columns, then Close & Apply. Power BI loads each table as its own query and, if the source has foreign keys, can detect relationships automatically. What you load decides how fast, small and maintainable the whole report is.
Why we use it
Loading only the tables and columns a report needs keeps refresh fast, the .pbix file small, the source database less loaded and the field list tidy for report authors and readers.
When to use it
Use Navigator multi-select for most cases, a database view or custom SQL when you need one pre-joined or pre-filtered result, and avoid loading entire databases. Shape oversized tables with a date filter in Power Query.
How it works
- Connect to the database
- Open the Navigator list of tables
- Do you need a pre-joined or pre-filtered result? Yes: Use a source view or a single custom SQL statement. No: Tick only the tables the report needs.
- Transform data: drop unused columns and rows
- Close & Apply, then verify relationships in Model view
- Clean star-schema model ready for DAX
Syntax
Option 1: Home → Get data → SQL Server → Navigator → tick several tables → Transform data / Load
Option 2: Advanced options → SQL statement (only one result set is used; combine with UNION ALL or JOIN)
Option 3: Ctrl+A in Navigator (loads everything; avoid)
Then: Model view → check detected relationshipsExample
1. Get data → SQL Server → server 'sql-prod-01', database 'SalesDB'.
2. In the Navigator tick Sales, Customers and Products (preview each one).
3. Click Transform data; in Sales remove unused audit columns.
4. Rename 'dim_customer' style names to Customers and Products.
5. Close & Apply, then open Model view and confirm:
Customers[CustomerID] 1 → * Sales[CustomerID]
Products[ProductID] 1 → * Sales[ProductID]Key points
- Navigator multi-select is the cleanest default
- Custom SQL runs one statement; use UNION ALL or JOIN to combine results
- Loading a whole database bloats the file and slows refresh
- Include relationship columns helps auto-detect relationships
- After loading, rename tables, hide keys and aim for a star schema