0 Replies Latest reply: Feb 13, 2017 8:04 AM by Dennis Thomsen RSS

    Look at more months if one month isn't reported.

    Dennis Thomsen
      Month / YearProductSell
      NOV 2016Cat10
      DEC 2016Cat50
      JAN 2017Cat70

       

      Hello everyone, I have a scrip that calculates the avg of "Sell" for the last 3 months.

      The result would be 43 for the product Cat.

       

      tabel 2:

      Month / YearProductSell
      NOV 2016Dog10
      DEC 2016Dog
      JAN 2017Dog50

       

       

      However, should one of the sell fields be blank (because it was not reported), then I'd like the calculation to look at more months instead. So instead of using table 2, it should calculate on table 3. And result would be 115/5 = 23 (qlik ignores blank when avg obviously).

       

      tabel 3:

      Month / YearProductSell
      AUG 2016Dog10
      SEP 2016Dog40
      OCT 2016Dog5
      NOV 2016Dog10
      DEC 2016Dog
      JAN 2017Dog50

       

      Thanks in advance for the help!