GetAlternativeCount - chart function
GetAlternativeCount() is used to find the number of alternative (light gray) values in the identified field.
Syntax:
GetAlternativeCount (field_name)
Return data type: integer
Arguments:
Argument | Description |
---|---|
field_name | The field containing the range of data to be measured. |
Examples and results:
The following example uses the First name field loaded to a filter pane.
Examples | Results |
---|---|
Given that John is selected in First name. GetAlternativeCount ([First name]) |
4 as there are 4 unique and excluded (gray) values in First name. |
Given that John and Peter are selected. GetAlternativeCount ([First name]) |
3 as there are 3 unique and excluded (gray) values in First name. |
Given that no values are selected in First name. GetAlternativeCount ([First name]) |
0 as there are no selections. |
Data used in example:
Names:
LOAD * inline [
First name|Last name|Initials|Has cellphone
John|Anderson|JA|Yes
Sue|Brown|SB|Yes
Mark|Carr|MC|No
Peter|Devonshire|PD|No
Jane|Elliot|JE|Yes
Peter|Franc|PF|Yes ] (delimiter is '|');