Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

Rick

1 Reply
jedgson
Creator
Creator

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

e.g.

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

Column(2)/Column(1)

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

Jay