2 Replies Latest reply: Mar 24, 2016 10:54 PM by dim loco RSS

    Spend Difference between two period (Latest vs. Previous)

    dim loco

      Hello folks,

       

      Please bare with me here, it has been a while since I have used Qlikview and my scripting kinda sux.

       

      I have a table like below:

        

      MonthDifference in QVSpendDifference in Excel
      Jan.00%39487.350%
      Feb29.12%32966.90-17%
      Mar-130.54%62196.3189%
      Apr-162.46%98574.4958%
      May198.05%54227.70-45%
      Jun-28.49%60607.8512%
      Jul88.07%40886.58-33%
      Aug-115.66%66783.8063%
      Sep75.37%49907.69-25%
      Oct113.39%24518.73-51%
      Nov79.04%6821.38-72%
      Dec-45.88%17095.73151%

       

      I am trying to get the spend difference between the latest period and the previous period.

       

      In QV, I used this formula : if(RowNo() = 1,0,sum(cost) - Above(sum(cost)))

       

      Please advise, what am I doing wrong here. Thanks a lot in advance.