8 Replies Latest reply: Mar 14, 2018 2:43 PM by Sunny Talwar RSS

    Rolling Percentage Calculation

    Wesley Tam

      Hello,

       

      I am trying to calculate a projected traffic number using the percentage listed on the table. For example, ABC.com's actual traffic starting from Dec-2017 is 300 and we expect a 25% increase in Jan-2018. Therefore, ABC.com's projected traffic would be 375. Then we take 375 and apply the 10% increase for Feb-2018 projected traffic number, and repeating this step for subsequent months. Is this possible to replicate in the script in Qlikview?

       

      This table example is the desired output in Qlikview.

       

      domainmonth_yearpercentageactual trafficprojected traffic
      ABC.comDec-2017-300-
      ABC.comJan-20180.25-(300 * (1 + .25)) = 375
      ABC.comFeb-20180.1-(375 * (1 + 1.1)) = 412.5
      ABC.comMar-2018-0.05-(412.5 * (1 - 0.05)) = 391.9
      ABC.comApr-20180.3-(391.9 * (1 + 0.3)) = 509.4

       

       

      Thank you!