counting values

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

Guest

Hi
I am having a mental block at the end of the day.
I am wanting to count the responses in a questionnaire. I have a field
called 'attending' and the possible values are 'valuable' 'okay' or 'not
valuable'. I want to report on how many thought that attending was 'valuable'
how many thought it was'okay' and so on. In my report I have used
=Count([attending]="valuable")
as the expression, but it just counts the number of entries not how many say
"valuable"
What expression do I use to return the required results?
 
Count() will simply count all values. False is a value as is True.

You should try:
=Sum(Abs([attending]="valuable"))
generically:
=Sum(Abs(-- your expression here --))
 
I have 2 questions regarding this topic. First one is what does the Abs
represent? Second one is where you have "valuable" as a value below, is it
possible to have more than one listed? For example if I wanted to count the
total of both "valuable" and "semi-valuable" and have the total of both
combined.

Thanks,

Chad

Duane Hookom said:
Count() will simply count all values. False is a value as is True.

You should try:
=Sum(Abs([attending]="valuable"))
generically:
=Sum(Abs(-- your expression here --))

--
Duane Hookom
MS Access MVP

lynn atkinson said:
Hi
I am having a mental block at the end of the day.
I am wanting to count the responses in a questionnaire. I have a field
called 'attending' and the possible values are 'valuable' 'okay' or 'not
valuable'. I want to report on how many thought that attending was
'valuable'
how many thought it was'okay' and so on. In my report I have used
=Count([attending]="valuable")
as the expression, but it just counts the number of entries not how many
say
"valuable"
What expression do I use to return the required results?
 
Abs() is the Absolute Value function so an expression that returns true/-1
becomes 1.

I don't understand what you are asking. Perhaps you should provide some
sample records and desired results.

--
Duane Hookom
MS Access MVP

CEV said:
I have 2 questions regarding this topic. First one is what does the Abs
represent? Second one is where you have "valuable" as a value below, is it
possible to have more than one listed? For example if I wanted to count the
total of both "valuable" and "semi-valuable" and have the total of both
combined.

Thanks,

Chad

Duane Hookom said:
Count() will simply count all values. False is a value as is True.

You should try:
=Sum(Abs([attending]="valuable"))
generically:
=Sum(Abs(-- your expression here --))

--
Duane Hookom
MS Access MVP

lynn atkinson said:
Hi
I am having a mental block at the end of the day.
I am wanting to count the responses in a questionnaire. I have a field
called 'attending' and the possible values are 'valuable' 'okay' or 'not
valuable'. I want to report on how many thought that attending was
'valuable'
how many thought it was'okay' and so on. In my report I have used
=Count([attending]="valuable")
as the expression, but it just counts the number of entries not how many
say
"valuable"
What expression do I use to return the required results?
 
Thanks for the response Duane. Here is a sample of one of the textbox's that
I have in my report. It gives me a total number count of how many people
left there position in this department. How would I set it up if I wanted to
combine the totals from 2 or more departments?

=Sum(Abs([Department]="Business Office")) This one works for just 1
department and I am not sure how to get it to combine the totals for 2 or
more departments.

Thanks,

Chad

Duane Hookom said:
Abs() is the Absolute Value function so an expression that returns true/-1
becomes 1.

I don't understand what you are asking. Perhaps you should provide some
sample records and desired results.

--
Duane Hookom
MS Access MVP

CEV said:
I have 2 questions regarding this topic. First one is what does the Abs
represent? Second one is where you have "valuable" as a value below, is it
possible to have more than one listed? For example if I wanted to count
the total of both "valuable" and "semi-valuable" and have the total of
both combined.

Thanks,

Chad

Duane Hookom said:
Count() will simply count all values. False is a value as is True.

You should try:
=Sum(Abs([attending]="valuable"))
generically:
=Sum(Abs(-- your expression here --))

--
Duane Hookom
MS Access MVP

message Hi
I am having a mental block at the end of the day.
I am wanting to count the responses in a questionnaire. I have a field
called 'attending' and the possible values are 'valuable' 'okay' or
'not
valuable'. I want to report on how many thought that attending was
'valuable'
how many thought it was'okay' and so on. In my report I have used
=Count([attending]="valuable")
as the expression, but it just counts the number of entries not how
many say
"valuable"
What expression do I use to return the required results?
 
If I understand correctly, you can use:
=Sum(Abs([Department]="Business Office" OR [Department]="Information
Technology Office"))
or
=Sum(Abs([Department] IN ("Business Office", "Information Technology
Office"))


--
Duane Hookom
MS Access MVP


CEV said:
Thanks for the response Duane. Here is a sample of one of the textbox's
that I have in my report. It gives me a total number count of how many
people left there position in this department. How would I set it up if I
wanted to combine the totals from 2 or more departments?

=Sum(Abs([Department]="Business Office")) This one works for just 1
department and I am not sure how to get it to combine the totals for 2 or
more departments.

Thanks,

Chad

Duane Hookom said:
Abs() is the Absolute Value function so an expression that returns
true/-1 becomes 1.

I don't understand what you are asking. Perhaps you should provide some
sample records and desired results.

--
Duane Hookom
MS Access MVP

CEV said:
I have 2 questions regarding this topic. First one is what does the Abs
represent? Second one is where you have "valuable" as a value below, is
it possible to have more than one listed? For example if I wanted to
count the total of both "valuable" and "semi-valuable" and have the total
of both combined.

Thanks,

Chad

"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
Count() will simply count all values. False is a value as is True.

You should try:
=Sum(Abs([attending]="valuable"))
generically:
=Sum(Abs(-- your expression here --))

--
Duane Hookom
MS Access MVP

message Hi
I am having a mental block at the end of the day.
I am wanting to count the responses in a questionnaire. I have a field
called 'attending' and the possible values are 'valuable' 'okay' or
'not
valuable'. I want to report on how many thought that attending was
'valuable'
how many thought it was'okay' and so on. In my report I have used
=Count([attending]="valuable")
as the expression, but it just counts the number of entries not how
many say
"valuable"
What expression do I use to return the required results?
 
That did it. I was not using the IN.

Thanks Duane,

Chad


Duane Hookom said:
If I understand correctly, you can use:
=Sum(Abs([Department]="Business Office" OR [Department]="Information
Technology Office"))
or
=Sum(Abs([Department] IN ("Business Office", "Information Technology
Office"))


--
Duane Hookom
MS Access MVP


CEV said:
Thanks for the response Duane. Here is a sample of one of the textbox's
that I have in my report. It gives me a total number count of how many
people left there position in this department. How would I set it up if I
wanted to combine the totals from 2 or more departments?

=Sum(Abs([Department]="Business Office")) This one works for just 1
department and I am not sure how to get it to combine the totals for 2 or
more departments.

Thanks,

Chad

Duane Hookom said:
Abs() is the Absolute Value function so an expression that returns
true/-1 becomes 1.

I don't understand what you are asking. Perhaps you should provide some
sample records and desired results.

--
Duane Hookom
MS Access MVP

I have 2 questions regarding this topic. First one is what does the Abs
represent? Second one is where you have "valuable" as a value below, is
it possible to have more than one listed? For example if I wanted to
count the total of both "valuable" and "semi-valuable" and have the
total of both combined.

Thanks,

Chad

"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
Count() will simply count all values. False is a value as is True.

You should try:
=Sum(Abs([attending]="valuable"))
generically:
=Sum(Abs(-- your expression here --))

--
Duane Hookom
MS Access MVP

message Hi
I am having a mental block at the end of the day.
I am wanting to count the responses in a questionnaire. I have a
field
called 'attending' and the possible values are 'valuable' 'okay' or
'not
valuable'. I want to report on how many thought that attending was
'valuable'
how many thought it was'okay' and so on. In my report I have used
=Count([attending]="valuable")
as the expression, but it just counts the number of entries not how
many say
"valuable"
What expression do I use to return the required results?
 
Back
Top