Home » DAX » Set functions in DAX – UNION, INTERSECT & EXCEPT

Set functions in DAX – UNION, INTERSECT & EXCEPT

Set functions in DAX Power BI

Set Functions – functions that operates on sets. In DAX there are three type of set functions and they are – UNION, INTERSECT and EXCEPT.

All three functions comes under Table Manipulation DAX Functions category.

Let’s understand all functions working-

1- UNION

UNION is a Power BI DAX function, it is used to combine two or more tables rows. Read in detail…

Syntax:

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

Go to Modeling Tab > Click on Table Icon and write below DAX

Union_Result = UNION(Table_1,Table_2)

See the UNION DAX output:

Power Bi Union Example

Power BI Union Example

Read more about UNION in detail…



2- INTERSECT

Compares two tables and returns common rows. The output of INTERSECT function is a table with the common rows. Read in detail…

Syntax:

INTERSECT(<table_expression1>, <table_expression2>

Go to Modeling Tab > Click on Table Icon and write below DAX

Intersect = INTERSECT(Table_1,Table_2)

See the INTERSECT DAX output:

Intersect DAX Output

Intersect DAX Output

Read more about INTERSECT in details…

3- EXCEPT

It is used to returns the rows of one table which do not present in another table. Read more in detail…

Syntax:

EXCEPT(<table_expression1>, <table_expression2>

Go to Modeling Tab > Click on Table Icon and write below DAX

Except= EXCEPT(Table_1,Table_2)




See the EXCEPT DAX output:

EXCEPT DAX Output

EXCEPT DAX Output

Read more about EXCEPT in details…

Refer DAX Post – UNION, 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.

Leave a Reply