countIf function in the Factory
The countIf function number of times a distinct value, which meets a specified condition, is present in an attribute.
Parameters Parameter Description condition The condition that must be met for the value to be counted. The condition parameter is mandatory. group The attribute by which you want to further group results.countIf(condition,group)
Example - countIf(condition)
Description | Screenshot |
---|---|
In the example we want to count the number of times the value in the Month attribute is November. We write the following formula in the formula bar:
Only the values which satisfy the conditions will be counted. In the Month attribute, the value is November in 8734 rows. |
Example - countIf(condition, group)
Description | Screenshot |
---|---|
If we want to group our results, we just need to add a group parameter. In this example, we want to group our results by the Country attribute values, so we type the formula:
The results are:
and so on. |