Totalling/grouping in reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column in a report that is supposed to show the percentage of a
running total. Specifically each row in the report shows a USD value for a
trade, and this column should show the percent that trade represents from
this groups whole. I used this to calculate the value...

=[USDValue]/Sum([USDvalue])

The problem is that the sum is not the sum for this group, but the sum for
the entire report.

Is there some easy way to fix this? I tried the Running Total settings, but
that's not it.

Maury
 
You could create a textbox (hidden if desired) in the section of the report
and set its Control Source to the USDValue and its Running Sum to Over
Group. In the textbox with the equation, you would then be able to use the
value from this new textbox as the denominator in your equation.

=[USDValue]/[txtSumTextbox]
 
Maury Markowitz said:
I have a column in a report that is supposed to show the percentage
of a running total. Specifically each row in the report shows a USD
value for a trade, and this column should show the percent that trade
represents from this groups whole. I used this to calculate the
value...

=[USDValue]/Sum([USDvalue])

The problem is that the sum is not the sum for this group, but the
sum for the entire report.

Is there some easy way to fix this? I tried the Running Total
settings, but that's not it.

Hi, Maury. Wouldn't this question be more on topic in the Access
Reports newsgroup?

What you can do here is put a text box in the group *Header* section
with this properties:

Name: txtGrpSum
ControlSource: =Sum([USDValue])
Visible: False (unless you want it to show)

Then in the Detail section you can set your group-percentage text box's
ControlSource to:

=[USDValue]/[txtGrpSum]

I believe that will do it.
 

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

Back
Top