subtotal of total of some of the groups

B

babs

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
 
G

ghetto_banjo

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

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

babs

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
 
M

Marshall Barton

babs said:
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 said:
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))
 
B

babs

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

Marshall Barton said:
babs said:
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 said:
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))
 
B

babs

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 said:
babs said:
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 said:
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))
 
B

babs

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 said:
babs said:
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 said:
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))
 

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