when

when, process option

Filters rows passed to a single process call.

Example

table T = with
  [| as Id, as X |]
  [| "a", 3 |]
  [| "b", 1 |]
  [| "c", 4 |]

x = sum(T.X) when (T.Id != "a")

show scalar "Filtered sum" with x

This outputs the following scalar:

Label Value
Filtered sum 5

Remarks

Use parentheses around the condition to avoid operator precedence surprises. when only affects the single process call where it appears.

See also

User Contributed Notes
0 notes + add a note