I'm doing a Kibana data table which looks like:
| Environment | Field1 | Field2 | Field3 | Field4 | 
|---|---|---|---|---|
| Dev | Sum | Sum | Sum | ??? | 
| QA | Sum | Sum | Sum | ??? | 
| Stage | Sum | Sum | Sum | ??? | 
| Prod | Sum | Sum | Sum | ??? | 
Field1, Field2, and Field3 are numeric fields, and I want the sum of those - no problem. However, Field4 is a Boolean field. What I need is to have Field4 be the number of true values in the field.
In SQL, I would do:
select
    sum(case 1 when 't.Field4' else 0 end) as Field4
from table t
I assume there's a way to do the same in a Kibana data table, probably using advanced field configuration and either sum or count, but I'm not certain where to start.