Home » DAX » DAX – UNION function

DAX – UNION function

Power Bi Union Example

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.

Refer similar DAX Post – EXCEPTINTERSECT

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.




Syntax:

UNION ( <Table 1>, <Table 2> …. ,<table N>)

Description:

S no. Parameter Description
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

How to take New Table in Power Bi

How to take New Table in Power Bi

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)
Union Query

Union Query




Step 4: Returns the output as a new table(Union_Result).

table 3

Refer similar DAX Post – EXCEPTINTERSECT

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:

DATATABLE

ALLSELECTED

ALL

ADDCOLUMNS

Power Bi Performance Analyzer

How to create Custom Theme in Power Bi

Custom Tooltips in Power Bi

Enable Syncs Slicers in Power Bi

Power Bi Interviews Q & A



Leave a Reply