Skip to main content

How to append two tables in DAX

Table of Contents

The UNION function in DAX is used to join two tables. Thus, the simplification of the analysis of data is done by app-ending the rows from two tables. The function takes in two tables and 1s ready to show a new table that has all the rows in them. The input tables must have the same numbers of columns. It does return, however, an output table with the structure of columns similar to that of the table of the first expression; the columns will be matched on their position. It preserves duplicates, effectively working like “union all.”

For example, to append Table1 and Table2 by writing the DAX code, you can use the following:

The AppendedTable code will generate a new table that includes all the rows from both Table 1 and Table 2.

Note: The new table does not inherit the relationships from the original tables. You will need to establish new relationships.

Add comment