Lazy loaded image
⛱️Power BI: Two ways to Union Tables - DAX and Power Query
Words 339Read Time 1 min
Mar 20, 2024
Aug 6, 2025

Power BI: Two ways to Union Tables - DAX and Power Query

type
status
date
slug
summary
tags
category
icon

How to Union Two Tables in Power BI: A Comprehensive Guide

Combining data from multiple tables is a common requirement in Power BI to create unified datasets for analysis and visualization. There are two primary methods to achieve this task in Power BI: using the DAX UNION function and using the Append Queries feature in Power Query. In this guide, we will walk you through the step-by-step process of both methods.

Method 1: Using DAX UNION Function

The DAX UNION function allows you to combine two or more tables with identical columns into a single table. Here's how you can use the UNION function in Power BI:
  1. Launch Power BI Desktop and load the tables that you want to union.
  1. Go to the Modeling tab on the Power BI ribbon.
  1. Click on New Table to create a new DAX table.
    1. notion image
  1. Enter the following DAX formula to union two tables, for example:
    1. Replace 'Query1' and 'Query2' with the actual table names you want to union.
    1. Press Enter to create the new table with the combined data from both tables.

    Method 2: Using Append Queries in Power Query

    Appending queries in Power Query allows you to combine tables by stacking one on top of the other. Here's a step-by-step guide to using the Append Queries feature:
    1. Load the tables into Power Query by selecting the table and clicking on the Transform Data option.
    1. In the Power Query Editor, select the first table you want to append.
    1. Go to the Home tab on the Power Query ribbon.
    1. Click on Append Queries and select Append Queries as New.
      1. notion image
    1. Choose the second table you want to append in the dialog box that appears.
    1. Configure the append operation by selecting the appropriate options (e.g., append queries with matching columns).
    1. Click OK to append the tables.
    1. Once appended, you can further transform the data or load it into Power BI for analysis.

    Conclusion

    By following these two methods, you can effectively union two tables in Power BI using either DAX or Power Query. Choose the method that best suits your data structure and analysis requirements to seamlessly integrate and consolidate your datasets.
    上一篇
    Setting Up Jupyter Notebook on a Windows Server: A Step-by-Step Guide
    下一篇
    How to read and write JSON files in Python

    Comments
    Loading...