Difference between revisions of "How do I do a count using a sum?"

From SmartWiki
Jump to: navigation, search
 
m
Line 1: Line 1:
 
 
'''Q: How do I do a count using a sum?
 
'''Q: How do I do a count using a sum?
  
 
''A: <nowiki>if([this]='Counting Criteria',1,0)</nowiki>  
 
''A: <nowiki>if([this]='Counting Criteria',1,0)</nowiki>  
 +
 +
'''Why do we do this?
 +
 +
''When using the '''Criteria''' line in the '''Report Builder''', one line of criteria is treated as a single '''AND''' statement. By using this method we can move the criteria up to the '''Calculate Field''' area and allow for multiple '''OR''' criteria using a singular AND statement in the Criteria line.''
  
 
[[Category:FAQ]][[Category:Reports]]
 
[[Category:FAQ]][[Category:Reports]]

Revision as of 16:41, 23 June 2008

Q: How do I do a count using a sum?

A: if([this]='Counting Criteria',1,0)

Why do we do this?

When using the Criteria line in the Report Builder, one line of criteria is treated as a single AND statement. By using this method we can move the criteria up to the Calculate Field area and allow for multiple OR criteria using a singular AND statement in the Criteria line.