Skip to main content

GetExcludedCount - chart function

GetExcludedCount() finds the number of excluded distinct values in the identified field. Only excluded (dark gray) fields are counted. Alternative (light gray) and selected excluded (dark gray with check mark) values are not counted.

Syntax:  

GetExcludedCount (field_name)

Return data type: string

Information note

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 this 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.

Related functions
Function Interaction
GetStateCounts - chart function

Using GetStateCounts(), you can combine the calculation of the following counts using a single function call:

  • Count of selected included values.

  • Count of possible values.

  • Count of alternative values.

  • Count of excluded values, not including alternative and selected excluded values.

  • Count of selected excluded values.

GetSelectedCount - chart function Returns the count of selected included values.
GetPossibleCount - chart function Returns the count of possible values.
GetAlternativeCount - chart function Returns the count of alternative values.

Examples and results:  

After loading the example script below into an app, create three filter panes: one for First name, one for Last name, and one for Initials. Each of the example expressions in the table can be added as KPI charts.

Examples and results
Examples Results

Given that no values are selected in First name.

GetExcludedCount (Initials)

Result is 0 because there are no selections.

Given that John is selected in First name.

GetExcludedCount (Initials)

Result is 5. There are 5 excluded values in Initials with dark gray color. The JA value will be white as it is associated with the selection John in First name.

Given that John and Peter are selected.

GetExcludedCount (Initials)

Result is 3. John is associated with 1 value and Peter is associated with 2 values, in Initials.

Given that John and Peter are selected in First name, and then Franc is selected in Last name.

GetExcludedCount ([First name])

Result is 3. There are 3 excluded values in First name with dark gray color. GetExcludedCount() only counts excluded values. Alternative and selected excluded values are not included in the count.

Given that John and Peter are selected in First name, and then Franc and Anderson are selected in Last name.

GetExcludedCount (Initials)

Result is 4. There are 4 excluded values in Initials with dark gray color. The other two values (JA and PF) will be white as they are associated with the selections John and Peter in First name.

Given that John and Peter are selected in First name, and then Franc and Anderson are selected in Last name.

GetExcludedCount ([Last name])

Result is 3. There are 3 excluded values in Last name, and they have dark gray color: Brown, Carr, and Elliot. The value Devonshire has light gray color (indicating that it is alternative), so it is not included in the count.

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 '|');

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!