value_when

value_when(condition, series, occurrence)
Parameters
Returns

series

Returns the source series value when the condition was true on the n-th most recent occurrence.