Wednesday, May 28, 2025

Power BI: How to Combine (UNION) Two Tables Using DAX

Merging tables is essential for consolidating data from multiple sources, ensuring a unified view for analysis. The UNION function in DAX allows you to combine two tables with identical columns into a single dataset. It’s a straightforward way to unify data from multiple sources or periods without altering existing relationships, making data integration seamless for analysis.


Below are the two tables that we will combine in Power BI using the UNION function:

  1. Table SalesData :


  2. Table SalesData_France :


  1. Below is the code to combine two tables using UNION in DAX:
    SalesData_All =

UNION ( SalesData, SalesData_France )

  1. Below is the Table SalesData_All which contains data from both the tables

No comments:

Post a Comment