Using Switch nodes for interval testing

Not long ago I asked to add combining conditions to the Switch node, like in the If node: Intervals in the Switch node - #4 by artildo

This is needed to test agaiinst intervals. Example out of all employees in the dataset get subsets of empolyees with the salary between $30,000 and $50,000 and between $50,000 and $100,000.

I found out no further works are needed, it is all here, but not documented.

The point is that once data is sent to an output, it is nomore taking part in further comparisons.
So if you want to get two intervals like that, you do:

  1. All the data with salary > 100,000 goes to output 0
  2. All the data with salary >= 50,000 goes to output 1
  3. All the data with salary >= 30,000 goes to output 2

The outputs 1 & 2 give you the data needed. It is important first to get rid of the “exessive data” which make up a “tale”

2 Likes