# GetNotSelectedCount

此圖表函數會傳回名為 fieldname 的欄位中未選取值 (紅色儲存格與黑色文字) 的數量。該欄位必須處於 And 模式，此函數才有意義。

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

(Inherited)GetNotSelectedCount ( FieldName [, IncludeExcluded])

* field\_name: 包含待測量資料範圍的欄位。
* include\_excluded：若 IncludeExcluded 為 True()，則計數會包括目前受其他欄位中的選項所排除的選取值。若為 False 或省略的話，就不會包括這些值。

下表列出了與此函數相關的其他函數。

相關函數

| 函數 | 互動 |
| --- | --- |
| [GetStateCounts](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getstatecounts.htm) | 使用 GetStateCounts()，您可以使用單一函數叫用合併下列計數的計算：<br><br><ul> <li> <p>所選包含值的計數。</p> </li> <li> <p>可能值的計數。</p> </li> <li> <p>已取消選取的值的計數 (僅當欄位處於 and (和) 模式時才可用)。</p> </li> <li> <p>替代值的計數。</p> </li> <li> <p>排除值的計數，不包括替代值和所選的排除值。</p> </li> <li> <p>所選排除值的計數。</p> </li> </ul> |
| [GetSelectedCount](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getselectedcount.htm) | 傳回所選包含值的計數。 |
| [GetPossibleCount](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getpossiblecount.htm) | 傳回可能值的計數。 |
| [GetAlternativeCount](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getalternativecount.htm) | 傳回替代值的計數。 |
| [GetNotSelectedCount](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/GetNotSelectedCount.htm#) | 傳回排除值的計數，不包括替代值和所選的排除值。 |

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

## 列表框中選取狀態的顏色

本頁所有資訊均指在具有特定設定的列表框中選取狀態的顏色：

* QlikView 文件設定為 Classic Extended 的色彩配置。請參閱： [選項外觀](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Document_Properties_General.htm#SelectionAppearance)

* 設定為開啟顯示替代選項的列表框。請參閱： [顯示替代選項](https://help.qlik.com/zh-TW/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/List_Box.htm#ShowAlternatives)

下表概述了具有此設定的列表框中每個選取狀態的色彩配置。

具有給定設定的列表框的色彩配置

| 狀態 | 儲存格色彩 | 文字色彩 |
| --- | --- | --- |
| 替代 | 白色 | 灰色 |
| 已取消選取 | 紅色 | 黑色 |
| 已排除 | 灰色 | 白色 |
| 可能 | 白色 | 黑色 |
| 已選取 | 綠色 | 黑色 |
| 已選取且已排除 | 灰色 | 綠色 |