How to Join Tables in Power BI

How to Join Tables in Power BI

In Power BI, tables are a basic step to create the data model. It is like a spreadsheet, which stores data in rows and columns, with each column representing a different field. Every table contains specific, structured information that keeps the data organized, clean, and efficient. Joining tables is very important when you are creating reports, as it provides a clear view of data, and it is very easy to manage. In this blog, let us explore the role of tables and the different ways to join them, along with examples.

Table of Contents:

What Are Tables in Power BI?

Tables are a structured way of representing data in rows and columns, and they keep your data clean and well-structured. Tables in Power BI are just like Excel spreadsheets. Tables in Power BI can be imported from various sources and are stored in Power BI.

Why Join Tables in Power BI?

Joining tables in Power BI allows you to create and manage your data from multiple sources.

  • It helps in creating reports and dashboards.
  • It helps in performing a detailed study of data.
  • It helps in preventing data loss during analysis.
  • It helps in filtering data across connected datasets.

Different Types of Table Joins in Power BI

Power BI offers many types of joins that are similar to SQL:

  • Inner Join: Inner Join allows only rows that have matching values in both tables.
  • Left Join: Left join in Power BI is used to return all rows from the left table and matched rows from the right table.
  • Right Join: Right Join allows rows from the right table and matched rows from the left table.
  • Full Outer Join: Full Outer Join allows you to return all rows when there is a match in either of the tables.

Power BI Joins vs Relationships: What’s the Difference?

Feature Power BI Table Join Power BI Relationships
Definition A join combines columns from two tables into one flat table using a matching key. A relationship connects two tables without merging them, allowing filtering and modeling across tables.
Use Case When you want to create a single table by combining columns (e.g., Power Query Join Power BI or Join tables using DAX in Power BI). When you want to build a data model with star/snowflake schemas.
Where Used Power Query Editor or DAX joins. Data Model view in Power BI.
Performance Joins can duplicate data and increase memory usage. Relationships are more efficient for large models.
Dynamic Updates Static if used in Power Query. Dynamic with DAX. Always dynamic—filters propagate across tables.

How to Join Tables in Power BI (Step-by-Step)?

Let’s join the two tables on the “CustomerID.

  • A Sales table.
  • A Customer table.

1. Customer Table:

CustomerIDCustomerNameCountry
1LeoUSA
2MariaCanada
3YashMexico
4DavidUSA

2. Sales Table:

SaleIDCustomerIDProductAmountSaleDate
1011Laptop12002024-12-01
1023Keyboard1002025-01-10
1032Monitor3002025-01-15
1041Mouse502025-01-01
1054Webcam802025-02-18

Method 1: Join Tables with Power Query in Power BI

Power Query Editor is an ETL tool (Extract, Transform, and Load) that is used to extract and reshape the data. Here, we have used Power Query Editor to join tables based on a common column.

Step 1: Load the dataset into Power BI

Click on Home > Get Data > Text/CSV

1. Customer Table:

Customer Table Join Tables in Power BI

This is the Customer table that looks after loading it into the dataset

2. Sales Table

Sales Table Join Tables in Power BI

This is the Sales table that looks after loading it into the dataset

Step 2: Go to Power Query Editor
Click on “Transform Data.”

Transform Data Combine tables Power BI

Step 3: Power BI Merge Queries

Select the Sales Table and click “Merge Queries.”

Step 4: In the Merge Window

Select Sales[CustomerID] and Select Customer[CustomerID] and choose the kind of join you want to apply (we will choose Left Outer Join because we want to keep all records from the sales table and matching customer details, which makes sure that no sales data is lost even if some customer information is missing).

Merge Window Combine tables Power BI

Step 4: Expand the Joined Table

After combining tables, a new column will appear in the table

  • Click on the expand icon
  • Select the field you want to bring
    • CustomerName
    • Country

Step 5: Result

Result Power Query Join Power BI

Explanation: Here, this table is formed by joining the Sales and Customer tables on CustomerID.

Method 2: Join tables using DAX in Power BI

DAX stands for Data Analysis Expressions, which is a powerful language in Power BI used for custom calculations and aggregation of data. We can also use DAX to join tables.

Step 1: Load the dataset into Power BI
Click on Home>Get Data>Text/CSV

1. Customer Table:

Customer Table

2. Sales Table

Sales Table

Step 2: Go to the Modelling Tab and write the formula below

Sales_Customer_Join = 
SELECTCOLUMNS (
    ADDCOLUMNS (
        Sales,
        "CustomerName", RELATED(Customer[CustomerName]),
        "Country", RELATED(Customer[Country])
    ),
    "SaleID", Sales[SaleID],
    "CustomerID", Sales[CustomerID],
    "Product", Sales[Product],
    "Amount", Sales[Amount],
    "SaleDate", Sales[SaleDate],
    "CustomerName", [CustomerName],
    "Country", [Country]
)
 Modelling Tab

Explanation: Here, this table is formed by joining the Sales and Customer tables on CustomerID.

Performance Comparison: Power Query Join vs DAX Join

Both Methods are correct and efficient for joining rows; however, let’s look at a comparison of Power Query Join vs DAX Join performance.

Feature Power Query Join DAX Join
Performance Power Query loads faster. DAX join is slower and recalculates when you refresh your data.
Memory usage Power Query doesn’t store any data in Power BI memory, so there is very little memory usage. DAX stores duplicate data in a table, so there is more memory usage as compared to Power Query Editor.
Flexibility Power Query is static after load. DAX is dynamic after loading.
Used For Power Query is used for ETL operations and basic joins. DAX is used for advanced calculations and custom logic.

Power BI Table Join Performance Tips & Considerations

  1. Before joining two tables together, try to remove unwanted rows and columns, which helps to improve performance.
  2. Make sure the column through which you are joining tables together does not contain any blank or null values.
  3. Remove duplicate data before joining the table, as it can lead to wrong results.
  4. Using a Left join in Power BI over a Full Outer Join leads to performance issues.
  5. Only select the columns you want to join. Avoid joining unnecessary fields, as it increases memory usage.

When Not to Join Tables in Power BI?

While joining tables is a common approach to build datasets, there are scenarios where using Power BI Table Join may not be ideal:

  1. Circular Dependencies
    Creating too many joins or bidirectional relationships may cause circular dependency issues, which are easier to manage with relationships instead of actual joins.
  2. Large Datasets with Repeating Data
    If you’re using a Left join in Power BI on large fact tables, it can duplicate values and slow down performance. In this case, creating relationships is more optimal.
  3. Unclean Data
    If either table contains nulls, blanks, or mismatched data types, the result of a join will be unreliable or cause errors.
  4. Calculated Measures Instead of Flattened Data
    If your goal is to calculate KPIs or metrics across tables, you should use relationships with DAX measures instead of creating flattened joined tables.

Best Practices for Joining Tables in Power BI

  • Name your table: Try to name your table when working with large and multiple tables, as this will avoid confusion.
  • Check Data Types: Always double-check the data types of the table that you plan to join.
  • Limit the Tables: Working on multiple tables can slow down the performance, so try to keep the number of tables fewer to increase the performance.
  • Use DAX: For transforming your data, you can use a DAX formula to make your data more efficient.

Fixing Common Power BI Join Errors

  • Different Data Types: There is no possibility of joining tables when two tables have columns with different data types. But you can fix this error by transforming the data types of columns in Power Query.
  • Duplicate values: If there are duplicate values in the column you want to join, then the join operation will not give you the correct result. You can fix this problem by removing all the duplicate values in the Power Query Editor.
  • Blank or Null values: If your table contains blank values or NULL values, then the joined table will also have blank values. To avoid this problem, try to remove blank values or try to fill them by applying statistical formulas like average, mean, mode, and median.
  • Case Sensitive: Make sure your records are either in uppercase or in lowercase. You can resolve this by making all records in uppercase or lowercase with the help of Text.Upper() or Text.Lower().
  • Incorrect Join Type: Applying the wrong join type in tables produces incorrect results, so make sure you are applying the correct type of joins and that it’s fetching you the correct result.

Use Cases for Table Joins in Power BI

1. Simplify export-ready datasets
Use Power BI merge queries to flatten your data model and prepare clean datasets for export, analysis, or integration with other tools.

2. Add descriptive fields to fact tables
Use Join Tables in Power BI to bring in customer names, product details, or region info into a sales or transaction table for better reporting.

3. Combine data from multiple sources
When working with data from different systems, use a Power BI Table Join to combine tables in Power BI into a single, unified view.

4. Clean and reshape the data before loading
Use Power Query Join in Power BI to merge tables during the ETL process, ensuring clean, well-structured data before it’s loaded into the model.

5. Create dynamic calculated columns
You can join tables using DAX in Power BI to build custom columns that respond to slicers and filters within your report.

Conclusion

Joining tables in Power BI is one of the most effective ways to work with data from multiple sources. It allows you to combine related information and create more meaningful insights. By using the correct join type and identifying the right common columns, you can ensure data accuracy and performance. Properly joined tables make the data model cleaner, faster, and easier to manage. This not only improves report quality but also helps in making better business decisions.

To learn more about Power BI and its functions, check out this Power BI Course and also explore Power BI Interview Questions prepared by industry experts.

Discover how to harness the full potential of Power BI and SQL Server through the articles listed below.

Web Scraping in Power BI – Using Power BI to scrape and analyze data from websites.

Power BI Pie Chart – Use Power BI to build interactive pie charts.

Bar and Column Charts in Power BI – Bar chart vs column chart usage in Power BI dashboards.

Calculate Running Total in SQL Server – Running sum calculation with OVER clause in SQL Server.

How to Join Tables in Power BI – FAQs

Q1. What does it mean to join tables in Power BI?

Joining tables is the process of combining data from different tables.

Q2. Can I join tables from different sources?

Yes, Power BI allows you to join tables from different sources.

Q3. What's the difference between a join and a relationship?

Join is used to Combine tables in Power BI into one, while relationship is used to connect two tables logically without combining them.

Q4. How to merge tables in Power BI?

To merge tables in Power BI, follow these steps using Power Query Editor:

  • Go to Home > Transform Data to open Power Query Editor.
  • Select the first table you want to merge.
  • Click Home > Merge Queries (or “Merge Queries as New” if you want a new table).
  • Choose the second table and select the matching column(s) in both tables.
  • Pick the type of join (e.g., Left Outer, Inner, Full Outer).
  • Click OK, then expand the merged column to select the fields you want to include.
  • Click Close & Apply to load the merged data into Power BI.
Q5. Where do I join tables in Power BI?

You can join tables in Power Query Editor in Power BI.

About the Author

Technical Research Analyst - Full Stack Development

Kislay is a Technical Research Analyst and Full Stack Developer with expertise in crafting Mobile applications from inception to deployment. Proficient in Android development, IOS development, HTML, CSS, JavaScript, React, Angular, MySQL, and MongoDB, he’s committed to enhancing user experiences through intuitive websites and advanced mobile applications.

Full Stack Developer Course Banner