I’m trying to do this:
ifelse(
{tipo} = ‘pet’,
sum({receita_abs}) / sum({receita}),
null
)
But I’m getting this error:
Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination.
I’m just trying to do a divison beteween to calculated fields but if a already with a filter or condition, to do this division only with cases where the collumn “type” have the value ‘pet’.