4 Replies Latest reply on Oct 11, 2016 3:46 PM by Alexander Mou

    Adding a condition to window_avg function

    jenn.ng

      I am currently using `window_avg` function to get the average revenue for the last 6 revenue values.

       

      This is my working calculated field.

      last_6_revenue = WINDOW_AVG(sum([Revenue Variance]),-5,0)

       

      revenue

      123

      456

      789

      191

      234

      125

      334

       

      However, i now want to omit revenue that is equal to 123,456,789.

       

      Can i just add in a where clause in the `window_avg` function for the above values to omit?

       

      the average should then be = `sum(191,234,125,334)/4`