How to count records with yes/no ticks

grenee

Registered User.
Local time
Today, 01:59
Joined
Mar 5, 2012
Messages
212
Good Day All,

I have a table "Table1" with fields "Late" and "Lunch" of Yes/No data type.

I created a report on this table displaying all the data.

I want to count how many records are ticked late and how many are ticked Lunch.

I know that if these were not combined in one report you could just count the records, but with them combined it is much more challenging.

I want to use the expression builder to make it easy.

My effort was : =Count([late]) and count([Lunch]). All these do are count the records.

Can anyone assist. I would be very grateful
 
Or in a textbox in the report footer:

=Sum(IIf(Late = True, 1, 0))
 
Or in a textbox in the report footer:

=Sum(IIf(Late = True, 1, 0))

Or more efficiently:
Code:
=Abs(Sum([Late]))
True is stored as -1 so it only need be summed and absolute value returned.
 

Users who are viewing this thread

Back
Top Bottom