Reputation: 15
I have a column in crystal reports named flag. it has values of both 0's and 1's. what is the best way to find out the sum of all the zeroes and sum of all the ones separately from a single column.
Also I need to find the number of values in a particular column.(here zeroes and ones)?
Upvotes: 0
Views: 1069
Reputation: 811
you can get this by having two Formula fields,
IF {Table.flag} = 0 THEN 1 ELSE 0;
now
sum(formulafield1)
will give number of zeros and
sum(Formulafield2)
will give number of ones
Please note i have used crystal reports long back .. please check syntax once .. :)
Upvotes: 1