5 Replies Latest reply: Nov 19, 2014 11:41 AM by Oscar Ortiz RSS

    Calculation based on a satisfied condition in a different field?

      In the attached Excel file, I have records that are marked either with "In" or "Out" in the Exception column, with each record having a particular Delta value.


      I want Qlikview to calculate 2 Delta averages based on whether a record is "In" or "Out".


      The result should be 2 values: one Delta average of ALL the "In" records, one Delta average of ALL the "Out" records.


      I've tried using an IF() statement: Avg(If(Exception='Out',Delta,0)) but the answer is wrong.


      Ideally, if Qlikview were averaging the "Outs" and came across an "In" it would simply skip it.


      Any help is appreciated.