Hi,
I’m trying to create a calculated column that’ll summarize ratios depending on the conditions (‘ABC’,‘XYZ’…). When I attempt to do so, without using a sum function the formula executes with no error, but the values are not correct.
Looks like I need to add a sum function to get the correct output but doing so throws an error -
“custom aggregations can’t contain both aggregated and nonaggregated fields in any combination”
Here is my query-
ifelse(CATEGORY=‘ABC’ OR CATEGORY=‘CID’,sum({a1})/sum({b}),
ifelse(CATEGORY=‘XYZ’,sum({a2})/sum({b}),
ifelse(CATEGORY=‘LMN’,sum({a3})/sum({b}),
ifelse(CATEGORY=‘OPQ’,sum({a4})/sum({b}),NULL)
)
)
)
Any help would be appreciated