Sum Top Values

P

pcaguy

My report displays the top 15 values of [NetofReturns]. I have a counter
that begins a new page after the 15th value in the detail section. In the
group footer, I need to display the sum of those 15 values along with the
group sum =sum([netofreturns] and a calculation of the percentage that the
top 15 make up of the group sum. The group sum is not a problem but the sum
of the top 15 is. I can display the running sum of the Top 15, but I can't
get that 15th sum into the footer.
 
M

Marshall Barton

pcaguy said:
My report displays the top 15 values of [NetofReturns]. I have a counter
that begins a new page after the 15th value in the detail section. In the
group footer, I need to display the sum of those 15 values along with the
group sum =sum([netofreturns] and a calculation of the percentage that the
top 15 make up of the group sum. The group sum is not a problem but the sum
of the top 15 is. I can display the running sum of the Top 15, but I can't
get that 15th sum into the footer.


Just reference the top15 value in a group footer text box:
=txtTop15

If you are having trouble calculating the top 15 value over
the entire group, then set the txtTop15 running sum text
box's expression to:
=IIf(txtLineCounter <= 15, NetofReturns, 0)
where txtLineCounter is the =1 running sum text box that you
are using to determine when to start a new page.
 
P

pcaguy

Thanks. That's what I needed.

Marshall Barton said:
pcaguy said:
My report displays the top 15 values of [NetofReturns]. I have a counter
that begins a new page after the 15th value in the detail section. In the
group footer, I need to display the sum of those 15 values along with the
group sum =sum([netofreturns] and a calculation of the percentage that the
top 15 make up of the group sum. The group sum is not a problem but the sum
of the top 15 is. I can display the running sum of the Top 15, but I can't
get that 15th sum into the footer.


Just reference the top15 value in a group footer text box:
=txtTop15

If you are having trouble calculating the top 15 value over
the entire group, then set the txtTop15 running sum text
box's expression to:
=IIf(txtLineCounter <= 15, NetofReturns, 0)
where txtLineCounter is the =1 running sum text box that you
are using to determine when to start a new page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top