Skip to main content

Hi all,

 

I'm struggling with a calculated field I'm trying to make and hoping someone can help me out.Basically, I'm trying to sum a dollar amount based on a specific critirea (in this case the outcome of a phone call). Here's what I thing I need....

 

IF [Call Outcome (Outcomes)]='Outcome 1' THEN SUM([Premium])

ELSE 0 END

 

The error I keep coming back with is that I cannot mix aggregate and non-aggregate comparisons. Is there any work around?

2 answers
  1. Mar 30, 2017, 2:15 PM

    Tim,

    Try changing your calculated filed to:

     

    IF [Call Outcome (Outcomes)]='Outcome 1' THEN [Premium]

    ELSE 0 END

     

    Then when you place the calculated field on a viz, you can aggregate it using SUM.

     

    A calculated field will effectively create a new column in your data, that contains a value for each row of your data.  Meaning that even rows where the Call Outcome is not equal to 'Outcome 1' will still have a value (in this case the value will be 0).  After that new column is created, you can treat it like any other column and sum it, or max it, or min it, etc.

     

    If you can post a sample of the data and what you are trying to achieve, we can probably help with more ideas.

    Kaz.

0/9000