Sums by header value in report

S

sword856

Hello all, I have a tricky summing problem for my report. It has the
fields Department, Priority, Category, Course, CountofEmployees, and
SumofCosts. It lists courses taken in each department, each with the
number of employees per class and total cost of sending that number of
employees to class. It is ordered first by Department, then by
Priority, then by Category, and it has to stay this way. I need sums
at the bottom of the whole report for each of the priorities, 1, 2,
and 3. Is there a way to say "sum all where priority=1" for a text
box control source or something?
This is very important, and anyone's help would be greatly appreciated!
 
K

KARL DEWEY

Try this in a textbox if Priority is a number field --
Sum(IIF([Priority] = 1, 1, 0))

Use this in a textbox if Priority is a text field --
Sum(IIF([Priority] = "1", 1, 0))

Repeat for priority 2 in another textbox.
 
S

sword856

Try this in a textbox if Priority is a number field --
Sum(IIF([Priority] = 1, 1, 0))

Use this in a textbox if Priority is a text field --
Sum(IIF([Priority] = "1", 1, 0))

Repeat for priority 2 in another textbox.

--
KARL DEWEY
Build a little - Test a little



Hello all, I have a tricky summing problem for my report. It has the
fields Department, Priority, Category, Course, CountofEmployees, and
SumofCosts. It lists courses taken in each department, each with the
number of employees per class and total cost of sending that number of
employees to class. It is ordered first by Department, then by
Priority, then by Category, and it has to stay this way. I need sums
at the bottom of the whole report for each of the priorities, 1, 2,
and 3. Is there a way to say "sum all where priority=1" for a text
box control source or something?
This is very important, and anyone's help would be greatly appreciated!- Hide quoted text -

- Show quoted text -
Thanks, Karl, for responding!
I wasn't clear about what I needed I think. I need the sum of the
costs for each priority, and the sum of the number of employees. So
what I need to sum for priorities 1, 2, and 3 is SumofCosts and
CountofEmployees. They are fields in the query on which the report is
based. Your advice did give me the sum of class occurences for each
priority, which is almost what I need.
 
K

KARL DEWEY

Try using this ---
Sum(IIF([Priority] = 1, [SumofCosts], 0))

--
KARL DEWEY
Build a little - Test a little


Try this in a textbox if Priority is a number field --
Sum(IIF([Priority] = 1, 1, 0))

Use this in a textbox if Priority is a text field --
Sum(IIF([Priority] = "1", 1, 0))

Repeat for priority 2 in another textbox.

--
KARL DEWEY
Build a little - Test a little



Hello all, I have a tricky summing problem for my report. It has the
fields Department, Priority, Category, Course, CountofEmployees, and
SumofCosts. It lists courses taken in each department, each with the
number of employees per class and total cost of sending that number of
employees to class. It is ordered first by Department, then by
Priority, then by Category, and it has to stay this way. I need sums
at the bottom of the whole report for each of the priorities, 1, 2,
and 3. Is there a way to say "sum all where priority=1" for a text
box control source or something?
This is very important, and anyone's help would be greatly appreciated!- Hide quoted text -

- Show quoted text -
Thanks, Karl, for responding!
I wasn't clear about what I needed I think. I need the sum of the
costs for each priority, and the sum of the number of employees. So
what I need to sum for priorities 1, 2, and 3 is SumofCosts and
CountofEmployees. They are fields in the query on which the report is
based. Your advice did give me the sum of class occurences for each
priority, which is almost what I need.
 
S

sword856

Try using this ---
Sum(IIF([Priority] = 1, [SumofCosts], 0))

--
KARL DEWEY
Build a little - Test a little



Try this in a textbox if Priority is a number field --
Sum(IIF([Priority] = 1, 1, 0))
Use this in a textbox if Priority is a text field --
Sum(IIF([Priority] = "1", 1, 0))
Repeat for priority 2 in another textbox.
--
KARL DEWEY
Build a little - Test a little
:
Hello all, I have a tricky summing problem for my report. It has the
fields Department, Priority, Category, Course, CountofEmployees, and
SumofCosts. It lists courses taken in each department, each with the
number of employees per class and total cost of sending that number of
employees to class. It is ordered first by Department, then by
Priority, then by Category, and it has to stay this way. I need sums
at the bottom of the whole report for each of the priorities, 1, 2,
and 3. Is there a way to say "sum all where priority=1" for a text
box control source or something?
This is very important, and anyone's help would be greatly appreciated!- Hide quoted text -
- Show quoted text -
Thanks, Karl, for responding!
I wasn't clear about what I needed I think. I need the sum of the
costs for each priority, and the sum of the number of employees. So
what I need to sum for priorities 1, 2, and 3 is SumofCosts and
CountofEmployees. They are fields in the query on which the report is
based. Your advice did give me the sum of class occurences for each
priority, which is almost what I need.- Hide quoted text -

- Show quoted text -

Thanks, Karl! That works great! Just out of curiousity, is the way
that works like so:
=Sum(IIF(<Criteria>, <value to summed for each record>, <don't know
what this is for>)) ?

Thanks again for your help, it came just in time!
 
K

KARL DEWEY

IIF(<Criteria>, <what to present if criteria test true>, <what to present
if criteria test false>)

--
KARL DEWEY
Build a little - Test a little


Try using this ---
Sum(IIF([Priority] = 1, [SumofCosts], 0))

--
KARL DEWEY
Build a little - Test a little



On Aug 8, 12:08 pm, KARL DEWEY <[email protected]>
wrote:
Try this in a textbox if Priority is a number field --
Sum(IIF([Priority] = 1, 1, 0))
Use this in a textbox if Priority is a text field --
Sum(IIF([Priority] = "1", 1, 0))
Repeat for priority 2 in another textbox.
:
Hello all, I have a tricky summing problem for my report. It has the
fields Department, Priority, Category, Course, CountofEmployees, and
SumofCosts. It lists courses taken in each department, each with the
number of employees per class and total cost of sending that number of
employees to class. It is ordered first by Department, then by
Priority, then by Category, and it has to stay this way. I need sums
at the bottom of the whole report for each of the priorities, 1, 2,
and 3. Is there a way to say "sum all where priority=1" for a text
box control source or something?
This is very important, and anyone's help would be greatly appreciated!- Hide quoted text -
- Show quoted text -
Thanks, Karl, for responding!
I wasn't clear about what I needed I think. I need the sum of the
costs for each priority, and the sum of the number of employees. So
what I need to sum for priorities 1, 2, and 3 is SumofCosts and
CountofEmployees. They are fields in the query on which the report is
based. Your advice did give me the sum of class occurences for each
priority, which is almost what I need.- Hide quoted text -

- Show quoted text -

Thanks, Karl! That works great! Just out of curiousity, is the way
that works like so:
=Sum(IIF(<Criteria>, <value to summed for each record>, <don't know
what this is for>)) ?

Thanks again for your help, it came just in time!
 
S

sword856

IIF(<Criteria>, <what to present if criteria test true>, <what to present
if criteria test false>)

--
KARL DEWEY
Build a little - Test a little



Try using this ---
Sum(IIF([Priority] = 1, [SumofCosts], 0))
--
KARL DEWEY
Build a little - Test a little
:
On Aug 8, 12:08 pm, KARL DEWEY <[email protected]>
wrote:
Try this in a textbox if Priority is a number field --
Sum(IIF([Priority] = 1, 1, 0))
Use this in a textbox if Priority is a text field --
Sum(IIF([Priority] = "1", 1, 0))
Repeat for priority 2 in another textbox.
--
KARL DEWEY
Build a little - Test a little
:
Hello all, I have a tricky summing problem for my report. It has the
fields Department, Priority, Category, Course, CountofEmployees, and
SumofCosts. It lists courses taken in each department, each with the
number of employees per class and total cost of sending that number of
employees to class. It is ordered first by Department, then by
Priority, then by Category, and it has to stay this way. I need sums
at the bottom of the whole report for each of the priorities, 1, 2,
and 3. Is there a way to say "sum all where priority=1" for a text
box control source or something?
This is very important, and anyone's help would be greatly appreciated!- Hide quoted text -
- Show quoted text -
Thanks, Karl, for responding!
I wasn't clear about what I needed I think. I need the sum of the
costs for each priority, and the sum of the number of employees. So
what I need to sum for priorities 1, 2, and 3 is SumofCosts and
CountofEmployees. They are fields in the query on which the report is
based. Your advice did give me the sum of class occurences for each
priority, which is almost what I need.- Hide quoted text -
- Show quoted text -
Thanks, Karl! That works great! Just out of curiousity, is the way
that works like so:
=Sum(IIF(<Criteria>, <value to summed for each record>, <don't know
what this is for>)) ?
Thanks again for your help, it came just in time!- Hide quoted text -

- Show quoted text -
Ah, got it. Thanks!
 

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