UNION
UNION(set, set)
Combines two sets into one, holding every row that is in either, such as a task's predecessors and its successors together. A row in both appears once, so counting a union never counts a task twice, and both sets must hold the same kind of row.
Arguments
| Argument | What to give it |
|---|---|
| set | A set of rows: Predecessors, FILTER(…), SAME([Phase]). |
| set | A second set of the same kind of row: tasks with tasks, assignments with assignments. |
Examples
Formula=COUNT(UNION(Predecessors, Successors))
How many tasks the task is tied to directly, in either direction.
Formula=COUNT(FILTER(UNION(Upstream, Downstream), UNION(Upstream, Downstream)[Critical]))
How many critical tasks share a logic path with this one, before or after it. A filter's condition must read the set it filters, so the union is written again (or named once with LET).
Formula on WBS rows=COUNT(UNION(Children, Ancestors))
On a WBS row: the nodes directly below it and every node above it.
Reach for something else when
| You want | Use |
|---|---|
| Only rows in both sets | INTERSECT |
| Rows in one set but not the other | EXCEPT |
| Rows that meet any of several conditions, from one set | FILTER with OR |
Common questions
Why does the editor say "UNION needs two sets of the same kind"?
The two sets hold different rows, such as tasks and links. InLinks is a set of links, not tasks; use Predecessors for the tasks at the other end.
=COUNT(UNION(Predecessors, OutLinks))
In what order are the rows?
In schedule order, whichever set they came from, so FIRST of a union is the earliest of its rows in that order.
