I’m trying to create a calculated field which requires one aggregated field and the other non aggregated in an if else statement. How can I remove error “Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination”
Another option (in addition to answer provided by Max) is to change aggregation to use level-aware calculation-window function with PRE_AGG parameter.
For example instead of
ifelse({field}=‘true’,sum({num_field}),0)
use
ifelse({field}=‘true’, sumOver({numfield}, [partitionfield1, partitionfield2], PRE_AGG), 0)