=Count([Category] if it is equal to 'Task ID'"), how do I fix thi

I

Iram

Hello,

I have a report with the fields "Date","Catgory","Amount" and I have grouped
it by "Date" by day.

For each day I need to Count the indivudual categories. There are
approximately 22 categories that the records are categorized by. So I figured
that I would need to create 22 text box's each with their own variation of
their category such as somthing along the lines of the below but I need your
help. Please. How do I fix these? I will be placing these text boxes in the
"Date Footer". Thanks.

=Count([Category] if it is equal to 'Task ID'")
=Count([Category] if it is equal to 'ASAP'")
=Count([Category] if it is equal to 'Pay Type'")
=Sum([Amount]= if Category = RLSD)
etc...



Thanks.
Iram/mcp
 
M

Marshall Barton

Iram said:
I have a report with the fields "Date","Catgory","Amount" and I have grouped
it by "Date" by day.

For each day I need to Count the indivudual categories. There are
approximately 22 categories that the records are categorized by. So I figured
that I would need to create 22 text box's each with their own variation of
their category such as somthing along the lines of the below but I need your
help. Please. How do I fix these? I will be placing these text boxes in the
"Date Footer".

=Count([Category] if it is equal to 'Task ID'")
=Count([Category] if it is equal to 'ASAP'")
=Count([Category] if it is equal to 'Pay Type'")
=Sum([Amount]= if Category = RLSD)
etc...

That's kind of ugly, but try this kind of thing:

=Abs(Sum(Category = 'Task ID'))

Personally, I think I would create a query to count the
categories by date. THen create a little report with the
new query as its record source and drio in into your
report's date footer. At least this way you will pick up
any new categories without having to modify your report.
 
I

Iram

Marshal, your code worked for the first three examples I gave but now I need
a peice of code for this example...

=Sum([Amount]= if Category = RLSD)

I need to add up all of the money in the "Amount" field if the Category is
RLSD.

Can you help me with this too?


Thanks.
Iram



Marshall Barton said:
Iram said:
I have a report with the fields "Date","Catgory","Amount" and I have grouped
it by "Date" by day.

For each day I need to Count the indivudual categories. There are
approximately 22 categories that the records are categorized by. So I figured
that I would need to create 22 text box's each with their own variation of
their category such as somthing along the lines of the below but I need your
help. Please. How do I fix these? I will be placing these text boxes in the
"Date Footer".

=Count([Category] if it is equal to 'Task ID'")
=Count([Category] if it is equal to 'ASAP'")
=Count([Category] if it is equal to 'Pay Type'")
=Sum([Amount]= if Category = RLSD)
etc...

That's kind of ugly, but try this kind of thing:

=Abs(Sum(Category = 'Task ID'))

Personally, I think I would create a query to count the
categories by date. THen create a little report with the
new query as its record source and drio in into your
report's date footer. At least this way you will pick up
any new categories without having to modify your report.
 
D

Duane Hookom

=Sum([Amount] * Abs([Category] = "RLSD"))

--
Duane Hookom
MS Access MVP


Iram said:
Marshal, your code worked for the first three examples I gave but now I
need
a peice of code for this example...

=Sum([Amount]= if Category = RLSD)

I need to add up all of the money in the "Amount" field if the Category is
RLSD.

Can you help me with this too?


Thanks.
Iram



Marshall Barton said:
Iram said:
I have a report with the fields "Date","Catgory","Amount" and I have
grouped
it by "Date" by day.

For each day I need to Count the indivudual categories. There are
approximately 22 categories that the records are categorized by. So I
figured
that I would need to create 22 text box's each with their own variation
of
their category such as somthing along the lines of the below but I need
your
help. Please. How do I fix these? I will be placing these text boxes in
the
"Date Footer".

=Count([Category] if it is equal to 'Task ID'")
=Count([Category] if it is equal to 'ASAP'")
=Count([Category] if it is equal to 'Pay Type'")
=Sum([Amount]= if Category = RLSD)
etc...

That's kind of ugly, but try this kind of thing:

=Abs(Sum(Category = 'Task ID'))

Personally, I think I would create a query to count the
categories by date. THen create a little report with the
new query as its record source and drio in into your
report's date footer. At least this way you will pick up
any new categories without having to modify your report.
 
I

Iram

I love you guys, you guys are the bomb!
Thanks Duane!



Iram

Duane Hookom said:
=Sum([Amount] * Abs([Category] = "RLSD"))

--
Duane Hookom
MS Access MVP


Iram said:
Marshal, your code worked for the first three examples I gave but now I
need
a peice of code for this example...

=Sum([Amount]= if Category = RLSD)

I need to add up all of the money in the "Amount" field if the Category is
RLSD.

Can you help me with this too?


Thanks.
Iram



Marshall Barton said:
Iram wrote:
I have a report with the fields "Date","Catgory","Amount" and I have
grouped
it by "Date" by day.

For each day I need to Count the indivudual categories. There are
approximately 22 categories that the records are categorized by. So I
figured
that I would need to create 22 text box's each with their own variation
of
their category such as somthing along the lines of the below but I need
your
help. Please. How do I fix these? I will be placing these text boxes in
the
"Date Footer".

=Count([Category] if it is equal to 'Task ID'")
=Count([Category] if it is equal to 'ASAP'")
=Count([Category] if it is equal to 'Pay Type'")
=Sum([Amount]= if Category = RLSD)
etc...

That's kind of ugly, but try this kind of thing:

=Abs(Sum(Category = 'Task ID'))

Personally, I think I would create a query to count the
categories by date. THen create a little report with the
new query as its record source and drio in into your
report's date footer. At least this way you will pick up
any new categories without having to modify your report.
 

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