hi,
I have the below and I get “Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination.”
Why? how can I make it work?
max({Amount USD}, [{case_id}]) /
distinct_count(dateDiff(truncDate("WK", truncDate('YYYY', {beta Date})), {beta Date}, 'WK')+1)