How to use sum or sumif in an "ifelse" aggregation

Viewed 411

I am using Amazon QuickSight and having troubles calculating a field in a table. I need to use an "ifelse" aggregation where the "if" and "else" are sums of other fields in the table. I keep getting the following error and don't understand how to correct it:

mismatched aggregation, custom aggregations cant contain both aggregate SUM and non - aggregated fields

Code example:

ifelse(
    ({calculated field} = "Won"),(sumIf({amount},(({field}="Won"))
    ))
    ,({calculated field} = "Not Final"),({sum_amount_2})
    ,1
    )
0 Answers
Related