# GetNotSelectedCount

This chart function returns the number of not-selected (red cell with black text) values in the field named fieldname. The field must be in and-mode for this function to be relevant.

Syntax:

GetNotSelectedCount ( field\_name [, include\_excluded])

(Inherited)GetNotSelectedCount ( FieldName [, IncludeExcluded])

Arguments:

* field\_name: The field containing the range of data to be measured.
* include\_excluded: If IncludeExcluded is True(), the count will include selected values, which are currently excluded by selections in other fields. If False or omitted, these values will not be included.

The following table lists other functions that are related to this function.

Related functions

| Function | Interaction |
| --- | --- |
| [GetStateCounts](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getstatecounts.htm) | Using GetStateCounts(), you can combine the calculation of the following counts using a single function call:<br><br><ul> <li> <p>Count of selected included values.</p> </li> <li> <p>Count of possible values.</p> </li> <li> <p>Count of deselected values (only available if the field is in and-mode).</p> </li> <li> <p>Count of alternative values.</p> </li> <li> <p>Count of excluded values, not including alternative and selected excluded values.</p> </li> <li> <p>Count of selected excluded values.</p> </li> </ul> |
| [GetSelectedCount](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getselectedcount.htm) | Returns the count of selected included values. |
| [GetPossibleCount](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getpossiblecount.htm) | Returns the count of possible values. |
| [GetAlternativeCount](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getalternativecount.htm) | Returns the count of alternative values. |
| [GetNotSelectedCount](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/GetNotSelectedCount.htm#) | Returns the count of excluded values, not including alternative and selected excluded values. |

Example:

`GetNotSelectedCount ( 
 Year )  ` `GetNotSelectedCount (Year,True())`

## Color of selection states in List Boxes

All information on this page refers to the color of selection states in a List Box with specific settings:

* The QlikView document configured to a Color Scheme of Classic Extended. See: [Selection Appearance](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Document_Properties_General.htm#SelectionAppearance)

* List Box configured with Show Alternatives turned on. See: [Show Alternatives](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/List_Box.htm#ShowAlternatives)

The following table outlines the color scheme for each selection state in a List Box with this configuration.

Color scheme for List box with given configuration

| State | Cell color | Text color |
| --- | --- | --- |
| Alternative | White | Gray |
| Deselected | Red | Black |
| Excluded | Gray | White |
| Possible | White | Black |
| Selected | Green | Black |
| Selected excluded | Gray | Green |