2 Replies Latest reply on Jun 6, 2017 5:11 PM by Zhouyi Zhang

    How to Do Average by excluding few values

    tejaswi.jaddu

      Hi All,

      I have requirement to do average as below:

       

      My Data

      Transaction
      Time(min)
      123a1
      123b2
      123c3
      123d4
      123e5
      123f6
      123g7

       

      Chart 1: In chart-1 i have to just count transactions , which is fine directly i can do count distinct function

      chart-2: But in chart-2, i have to exclude transaction which has less time as 1 and greater than 6, which means i have to calculate transactions only in 2-6 mins range and also find out average time for those transactions.

       

      I can't avoid those transactions at query level because it is required for chart-1 but for chart-2 i should consider only between 2-6mins range has to be applied.

       

      Can someone suggest any solution.

       

      Thanks,

      Teja