3 Replies Latest reply: May 25, 2018 6:18 AM by Martin Hamilton RSS

    Calculate Average based on value of 2 columns on same record

    Martin Hamilton

      Hi

       

      I have a set of data which looks like the following:

       

      StatusDays
      Active8878
      In Active989
      Active8989

       

      I wish to calculate the average on the column entitled Days when column entitled Status equals Active

       

      I tried to construct the following but its not working:

       

      =Avg(Aggr(If([Status]) = 'Active', Avg([Days])))

       

      The expression is looking ok but its not returning a value.

       

      Any ideas? have I even got the expression in the correct format?

       

      thanks

       

      Martin