5 Replies Latest reply: May 26, 2018 11:42 AM by Hung dep RSS

    How to calculate AVERAGE 4 rolling period sales

    Hung dep

      Hi all bro,

      I am a newbie and trying to build a BI report. Now I get stuck at this point and hope you guys can help me.

       

      I got a huge sales table by day; like this:

       

       

      DateSKUSALES
      1/1/2018A2
      1/6/2018B4
      1/7/2018A6
      1/13/2018A8
      1/15/2018A10
      1/16/2018B12
      1/21/2018A14
      1/27/2018A16
      1/28/2018B18
      1/29/2018A20
      2/3/2018B22
      2/4/2018A24
      2/9/2018B26
      2/10/2018A28
      2/11/2018B30
      2/16/2018A32
      2/17/2018B34
      2/18/2018A36
      2/19/2018B38
      2/24/2018A40
      2/27/2018B42
      2/28/2018A44

       

      Qlik Sense will generate a Week dimension based on Date.

       

      Now what i want is a measurement of average last 4 week SALES like this result table:

         

      Date.autoCalendar.WeekSum(SALES)Avg last 4 week SALES
      W16-
      W2146
      W32210
      W43014
      W56018
      W67831.5
      W79647.5
      W811466
      W98687
      Grand Total506

       

      Bro, please help me to go ahead. Thank you all.