Sum of Yes/No data format in query

  • Thread starter Thread starter shaun
  • Start date Start date
S

shaun

I am trying to summarize the total number of Yes for
column. I only get negative (-) number. How can I turn
that into an actual number of records with yes marked?
 
Abs(Sum([FieldName]))

In ACCESS, True is the value -1. So summing True values will give a negative
number. Just wrap the sum with the Abs function to make it positive.
 
Understood and thank you for replying. However, in the
Design view of a query where I am building a select query
with groupings and totals, where does this expression go?

-----Original Message-----
Abs(Sum([FieldName]))

In ACCESS, True is the value -1. So summing True values will give a negative
number. Just wrap the sum with the Abs function to make it positive.
--
Ken Snell
<MS ACCESS MVP>

I am trying to summarize the total number of Yes for
column. I only get negative (-) number. How can I turn
that into an actual number of records with yes marked?


.
 
Go to the field that you're summing.

Click into the cell for the field name. Put at the front of the field name
this text:
AbsField: Abs(

Then put a ) at the end of the field name. Be sure that the field name is
enclosed inside [ ] characters.

That should do it.

--
Ken Snell
<MS ACCESS MVP>

shuan said:
Understood and thank you for replying. However, in the
Design view of a query where I am building a select query
with groupings and totals, where does this expression go?

-----Original Message-----
Abs(Sum([FieldName]))

In ACCESS, True is the value -1. So summing True values will give a negative
number. Just wrap the sum with the Abs function to make it positive.
--
Ken Snell
<MS ACCESS MVP>

I am trying to summarize the total number of Yes for
column. I only get negative (-) number. How can I turn
that into an actual number of records with yes marked?


.
 
Back
Top