1 Reply Latest reply: Oct 6, 2016 3:11 PM by Sunny Talwar RSS

    average function

    Aizlyn Pieszak

      can anyone tell me where the error is in this please?

       

      AVG(

      IF(

      min(FLOOR([Work Order First Response Date])) > Max(FLOOR([Work Order Request Date])),

      networkdays(Max(FLOOR([Work Order Request Date])), min(FLOOR([Work Order First Response Date]))),

      networkdays(min(FLOOR([Work Order First Response Date])), Max(FLOOR([Work Order Request Date])))

      )

      )-1

        • Re: average function
          Sunny Talwar

          You are trying to use an aggregation within an aggregation without using the Aggr() function

           

          AVG(

          Aggr(

          IF(

          min(FLOOR([Work Order First Response Date])) > Max(FLOOR([Work Order Request Date])),

          networkdays(Max(FLOOR([Work Order Request Date])), min(FLOOR([Work Order First Response Date]))),

          networkdays(min(FLOOR([Work Order First Response Date])), Max(FLOOR([Work Order Request Date])))

          )

          , AggregatingDimension/s)

          )-1