This is a migrated thread and some comments may be shown as answers.

Boolean/Checkbox Aggregate Count

1 Answer 166 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 27 May 2009, 11:08 AM
Hoopefully one with an easy answer

I have multiple columns in the report that are mapped to  sql.bit type fields that displays as a checkboxs and I am wondering how i can get a Total of the column

Basically, when the column has 'true' in it I would like to sum (or count) these occurances and have it display in the footer

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Danyell
Top achievements
Rank 1
answered on 14 Mar 2014, 06:39 AM
= Sum(IIf(Fields.IsRejected="True",1,0))

The if statement reads, if {your field name} equals True, change the value to 1, otherwise change to 0.  From there the Sum function adds up the 1s.

Hope this helps others!
Tags
General Discussions
Asked by
Jack
Top achievements
Rank 1
Answers by
Danyell
Top achievements
Rank 1
Share this question
or