Count is used to count distinct things.
- For example, if you want to count people who took a specific class, and even if they took the class more than once you still only want to count each person once.
Count All is used to count all the rows the query returns.
- For example, if you want to count enrollments in a specific class and you want all enrollments, such that if a person took the class twice, they should count as 2 enrollments. (Be careful with Count All: you need to make sure you understand everything the query is returning, or you could end up counting more than you really want.)
Report Variable syntax:
- Count([PennID]) will return a distinct count of PennIDs, even if there are duplicates in the data you have returned.
- If you have breaks on additional information in the report, say for example the person’s department, and a Count([PennID]) on each break, then the count will show distinct PennIDs in each department.
- Count([PennID];ALL) will return a count of all the rows in a report, or in a section of a report, instead of only counting people once.