1 Reply Latest reply: Oct 25, 2011 7:40 AM by Sanchez10 RSS

    full accumulation divide

      i'm trying to analyse some football stats that I have to track how a particular stat changes on a weekly basis


      I want to divide 2 fully accumulated figures so I can have a running % for each week and person in a line chart.

      see example, I have included a line graph of accumulated goal difference, but this is easy, its straightforward accumulation.


      I want a similar table with win %


      I can produce a straight table with games played and games won, but cant get the 2 accumulated figures to divide, or for the percentage to be an average, of % to date.

      if you select tommy for example to % should read 100%,100%,66.66%,50%,60%

      because instead of dividing by the accumulated figure e.g. played 5 won 3 its dividing by each weeks figure, e.g played 1 won 0 or played 1 won 1.


      does this make sense?


      what am I doing wrong, is this even possible in qlikview 8.5?


      Thanks in advance for your help.



        • full accumulation divide
          Jay Edgson

          Instead of using accumulation on the expressions, you could use the rangesum() function combined with the above() function().



          for P

          rangesum(Above(Total count(Date),0,rowno(Total)))


          for LW

          rangesum(Above(Total if(Result='W',1,0),0,rowno(Total)))


          The % would then be



          N.B. Make sure accumulation is set to 'No Accumulation'