SearchKit: SearchSegments
Do a full example of creating Pivot Table on basis of:
Coleman: That's basically what SearchSegments are for: dev/core#3477 (closed) has an example. The ordering in the example of the 1 and 0 labels is important. I.e. if the 1 label is put before the 0 label it will count the 1s as 0s even if the logic otherwise looks right.
Ask Coleman for help if stuck developing this.