Sum Top Values

  • Thread starter Thread starter pcaguy
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top