- My goal: calculate sum of "true" values in a boolean column
- Issue: summary row only allows "count distinct" operation for boolean types
Hello @pavelgur!
Is it required for this info to be displayed in the summary row or is that just the most natural place you'd expect to see it?
I can live with showing it separately as a workaround, but long term doesn't work since other columns are shown in the summary row and it's confusing.
One thing you could try is to create a secondary column which tracks the values as integers and sum.
Otherwise, mapping the total could be handled by a transformer which tracks the values as a map or reduce function:
const yourDataArray = [true, true, true, false];
return yourDataArray.reduce((acc, curr) => acc + (curr ? 1 : 0), 0);
//output: 3
Yes, I did that myself as a workaround. Have 1/0 instead of checkboxes now. When may I expect the Sum operation to be supported for booleans though?
Hi @pavelgur! Just wanted to jump in here on what to expect. I would consider a sum aggregation on boolean values as kind of a custom aggregation, which is a FR for us that is currently in our backlog. I can't give you a timeline, however, it is a regularly requested feature so every time it's bumped helps.