A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

subtotal of total of some of the groups



 
 
Thread Tools Display Modes
  #1  
Old June 10th, 2009, 08:06 PM posted to microsoft.public.access.reports
babs
external usenet poster
 
Posts: 409
Default subtotal of total of some of the groups

i have my report grouped by dept # ex. depts 1thru 7 each group has its own
subtotal of sum[reg pay] by dept and I have a grand total for all of the
groups. I want to total the subtotals of depts 1 thru 4 not sure of the
exact formula do I use an Iif and how do I say 1 thru 4??? what am i missing?

thanks,
barb
  #2  
Old June 10th, 2009, 09:31 PM posted to microsoft.public.access.reports
ghetto_banjo
external usenet poster
 
Posts: 325
Default subtotal of total of some of the groups

In the group footer, you could try setting the field to:

=Sum(iif([DeptNum] 5), [reg pay], 0)
  #3  
Old June 10th, 2009, 10:30 PM posted to microsoft.public.access.reports
babs
external usenet poster
 
Posts: 409
Default subtotal of total of some of the groups

I am getting the error
expression has the wrong number of arguments with the below syntax???

I am putting it in the report footer because i want it to only sum up where
the deptnum is 5 and then take that total and subtract it from the grand
total.

thanks,
barb

"ghetto_banjo" wrote:

In the group footer, you could try setting the field to:

=Sum(iif([DeptNum] 5), [reg pay], 0)

  #4  
Old June 11th, 2009, 12:13 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default subtotal of total of some of the groups

babs wrote:

I am getting the error
expression has the wrong number of arguments with the below syntax???

I am putting it in the report footer because i want it to only sum up where
the deptnum is 5 and then take that total and subtract it from the grand
total.


"ghetto_banjo" wrote:
In the group footer, you could try setting the field to:

=Sum(iif([DeptNum] 5), [reg pay], 0)



A paren is in the wrong place. Try using:

=Sum([reg pay]) - Sum(iIf(DeptNum 5, [reg pay], 0))

--
Marsh
MVP [MS Access]
  #5  
Old June 11th, 2009, 07:08 AM posted to microsoft.public.access.reports
babs
external usenet poster
 
Posts: 409
Default subtotal of total of some of the groups

Thanks got it - had to put [Dept Name] - otherwise Perfect!!!

"Marshall Barton" wrote:

babs wrote:

I am getting the error
expression has the wrong number of arguments with the below syntax???

I am putting it in the report footer because i want it to only sum up where
the deptnum is 5 and then take that total and subtract it from the grand
total.


"ghetto_banjo" wrote:
In the group footer, you could try setting the field to:

=Sum(iif([DeptNum] 5), [reg pay], 0)



A paren is in the wrong place. Try using:

=Sum([reg pay]) - Sum(iIf(DeptNum 5, [reg pay], 0))

--
Marsh
MVP [MS Access]

  #6  
Old June 23rd, 2009, 09:25 PM posted to microsoft.public.access.reports
babs
external usenet poster
 
Posts: 409
Default subtotal of total of some of the groups

just got back to doing this report and I am putting the formula into the
deptnum Footer - it is grouped by deptnum. so the if then I am using is just
Looking at the dept num within that group so the answer of this formula

=Sum(IIf([cost id]5,[reg pay],0)) and just Sum([reg pay]) is identical -
where do I put it so can see the dept. among All the groups. so the sum of
dept num 4 for ALL of the dept - both formula answers are identical - I want
a GRand total for dept 1t through 4???

thanks,
barb

"Marshall Barton" wrote:

babs wrote:

I am getting the error
expression has the wrong number of arguments with the below syntax???

I am putting it in the report footer because i want it to only sum up where
the deptnum is 5 and then take that total and subtract it from the grand
total.


"ghetto_banjo" wrote:
In the group footer, you could try setting the field to:

=Sum(iif([DeptNum] 5), [reg pay], 0)



A paren is in the wrong place. Try using:

=Sum([reg pay]) - Sum(iIf(DeptNum 5, [reg pay], 0))

--
Marsh
MVP [MS Access]

  #7  
Old June 23rd, 2009, 09:54 PM posted to microsoft.public.access.reports
babs
external usenet poster
 
Posts: 409
Default subtotal of total of some of the groups


I want to show the totals at the end of Dept num 4 AS WELL AS at the end of
the Report - I can put them in the report header and it works but HOW can I
put this in the end of DEpt 4???

thanks,barb
"Marshall Barton" wrote:

babs wrote:

I am getting the error
expression has the wrong number of arguments with the below syntax???

I am putting it in the report footer because i want it to only sum up where
the deptnum is 5 and then take that total and subtract it from the grand
total.


"ghetto_banjo" wrote:
In the group footer, you could try setting the field to:

=Sum(iif([DeptNum] 5), [reg pay], 0)



A paren is in the wrong place. Try using:

=Sum([reg pay]) - Sum(iIf(DeptNum 5, [reg pay], 0))

--
Marsh
MVP [MS Access]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.