EXCEPT
EXCEPT(set, set)
Keeps the rows of the first set that aren't in the second, such as everything upstream of a task except its direct predecessors. Order matters: EXCEPT(a, b) is never the same as EXCEPT(b, a), and both sets must hold the same kind of row.
Arguments
| Argument | What to give it |
|---|---|
| set | The rows to start from: Upstream, All, FILTER(…). |
| set | The rows to take out, of the same kind. Rows that aren't in the first set are ignored. |
Examples
Formula=COUNT(EXCEPT(Upstream, Predecessors))
How many tasks feed this one only indirectly, through other tasks.
Formula=COUNT(EXCEPT(All, ROWS(Relationships[Successor])))
How many tasks in the schedule have no predecessor at all: every task, less those a relationship leads into. A useful open-start check for a guardrail.
Formula=COUNT(EXCEPT(Upstream, DrivingUpstream))
How many upstream tasks have float to spare against this task: they lead into it, but not on its driving chain.
Reach for something else when
| You want | Use |
|---|---|
| Rows that fail a condition | FILTER with the condition turned round |
| Rows in both sets | INTERSECT |
| Rows in either set | UNION |
To turn a column of tasks, like Relationships[Successor], into a set | ROWS |
Common questions
Why does the editor say "EXCEPT needs two sets of the same kind"?
The two sets hold different rows. Relationships are relationship rows, not tasks; read the tasks out of them with ROWS(Relationships[Successor]).
=COUNT(EXCEPT(All, Relationships))
