3 Replies Latest reply: Feb 1, 2016 7:41 AM by Tresesco B RSS

    Set analysis: error in expression

    Hasvine Dhurmea

      Hello All,

       

      I am using the expression below to get the count of calls which where hanged up between 1 to 5 seconds :

       

      =Count({<WaitDuration={'>=1'}, WaitDuration={'<=5'}>}IF(

              (timeFROMbegin>=begin1 and timeFROMbegin<=end1)

              OR

              (timeFROMbegin>=begin2 and timeFROMbegin<=end2)

              OR

              (timeFROMbegin>=begin3 and timeFROMbegin<=end3)

              OR

              (timeFROMbegin>=begin4 and timeFROMbegin<=end4)

              OR

              (timeFROMbegin>=begin5 and timeFROMbegin<=end5)

              OR

              (timeFROMbegin>=begin6 and timeFROMbegin<=end6)

              OR

              (timeFROMbegin>=begin7 and timeFROMbegin<=end7)

              OR

              (timeFROMbegin>=begin8 and timeFROMbegin<=end8)   

              OR    

              (timeFROMbegin>=begin9 and timeFROMbegin<=end9)

              OR

              (timeFROMbegin>=begin10 and timeFROMbegin<=end10)

              OR

              (timeFROMbegin>=begin11 and timeFROMbegin<=end11)

              OR

              (timeFROMbegin>=begin12 and timeFROMbegin<=end12)

              OR

              (timeFROMbegin>=begin13 and timeFROMbegin<=end13)

              OR

              (timeFROMbegin>=begin14 and timeFROMbegin<=end14)

               ,ID))

       

      I am got a wrong figure.

       

      Any idea on how to correct the formula.

       

      Many Thanks,

       

      Hasvine

        • Re: Set analysis: error in expression
          Sunny Talwar

          Not sure if this will make a difference in the output, but try this:

           

          =Count({<WaitDuration={'>=1<=5'}>} If(

                  (timeFROMbegin>=begin1 and timeFROMbegin<=end1)

                  OR

                  (timeFROMbegin>=begin2 and timeFROMbegin<=end2)

                  OR

                  (timeFROMbegin>=begin3 and timeFROMbegin<=end3)

                  OR

                  (timeFROMbegin>=begin4 and timeFROMbegin<=end4)

                  OR

                  (timeFROMbegin>=begin5 and timeFROMbegin<=end5)

                  OR

                  (timeFROMbegin>=begin6 and timeFROMbegin<=end6)

                  OR

                  (timeFROMbegin>=begin7 and timeFROMbegin<=end7)

                  OR

                  (timeFROMbegin>=begin8 and timeFROMbegin<=end8)  

                  OR   

                  (timeFROMbegin>=begin9 and timeFROMbegin<=end9)

                  OR

                  (timeFROMbegin>=begin10 and timeFROMbegin<=end10)

                  OR

                  (timeFROMbegin>=begin11 and timeFROMbegin<=end11)

                  OR

                  (timeFROMbegin>=begin12 and timeFROMbegin<=end12)

                  OR

                  (timeFROMbegin>=begin13 and timeFROMbegin<=end13)

                  OR

                  (timeFROMbegin>=begin14 and timeFROMbegin<=end14)

                   ,ID))

          • Re: Set analysis: error in expression
            Tresesco B

            When you use same field reference more than once in set analysis it takes the first reference into calculation, so when you use   ({<WaitDuration={'>=1'}, WaitDuration={'<=5'}>} , the expression would actually take the first reference (i.e - {<WaitDuration={'>=1'} ) and would get result accordingly. The solution is suggested by Sunny T above.