GetPossibleCount - chart function
GetPossibleCount() is used to find the number of possible values in the identified field. If the identified field includes selections, then the selected (green) fields are counted. Otherwise associated (white) values are counted.
For fields with selections GetPossibleCount() returns the number of selected (green) fields.
Return data type: integer
Syntax:
GetPossibleCount (field_name)
The colors used in the selection bar, and for each selection state, can be modified with a custom theme. If you are working with an app that uses a custom theme, you might notice that your selections do not display with the same colors that are described in the help topic.
Arguments:
Arguments | Description |
---|---|
field_name | The field containing the range of data to be measured. |
The following table lists other functions that are related to this function.
Function | Interaction |
---|---|
GetStateCounts - chart function |
Using GetStateCounts(), you can combine the calculation of the following counts using a single function call:
|
GetSelectedCount - chart function | Returns the count of selected included values. |
GetAlternativeCount - chart function | Returns the count of alternative values. |
GetPossibleCount - chart function | Returns the count of excluded values, not including alternative and selected excluded values. |
Examples and results:
The following example uses two fields loaded to different filter panes, one for First name name and one for Initials.
Examples | Results |
---|---|
Given that John is selected in First name. GetPossibleCount ([Initials]) |
1 as there is 1 value in Initials associated with the selection, John, in First name. |
Given that John is selected in First name. GetPossibleCount ([First name]) |
1 as there is 1 selection, John, in First name. |
Given that Peteris selected in First name. GetPossibleCount ([Initials]) |
2 as Peter is associated with 2 values in Initials. |
Given that no values are selected in First name. GetPossibleCount ([First name]) |
5 as there are no selections and there are 5 unique values in First name. |
Given that no values are selected in First name. GetPossibleCount ([Initials]) |
6 as there are no selections and there are 6 unique values in Initials. |
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 '|');