UNION is a Power BI DAX function, it is used to combine two or more tables rows. Its comes under Table Manipulation DAX Functions category.
Points to be remember:
- The tables should be same number of columns.
- Columns are combined by position in their respective tables.
- The column names in the return table will match the column names in the first Table.
- It returns the all tables rows, including duplicate rows.
UNION ( <Table 1>, <Table 2> …. ,<table N>)
|1||table name||A table that will participate in the union and it is repeatable.|
Let’s start with an example
Step 1: Two sample tables with data as below
Step 2: Go to Modeling Tab, click on New Table
Step 3: After that one DAX formula screen appears, write below query there
Table_1 : First table name
Table_2: Second table name
Union_Result = UNION(Table_1,Table_2)
Step 4: Returns the output as a new table(Union_Result).
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.
Recommended Power BI Post: