# GetExcludedCount

GetExcludedCount() は、特定した項目に含まれる除外された個別の値の数を検出します。除外された (灰色セルに白文字) 値のみがカウントされます。代替値 (白いセルに灰色文字) および選択除外値（灰色セルに緑文字) はカウントされません。

構文:

GetExcludedCount (field\_name)

戻り値データ型： 文字列

引数：

* field\_name: メジャー対象となるデータ範囲が含まれている項目です。

次の表には、この関数に関連するその他の関数が示されています。

関連する関数

| 関数 | 相互作用 |
| --- | --- |
| [GetStateCounts](https://help.qlik.com/ja-JP/qlikview/September2025/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/ja-JP/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getselectedcount.htm) | 選択された含められた値の個数を返します。 |
| [GetPossibleCount](https://help.qlik.com/ja-JP/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getpossiblecount.htm) | 可能な値の個数を返します。 |
| [GetNotSelectedCount](https://help.qlik.com/ja-JP/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/GetNotSelectedCount.htm) | 選択解除された値の個数 (項目が AND モードの場合のみ有効) を返します。 |
| [GetAlternativeCount](https://help.qlik.com/ja-JP/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getalternativecount.htm) | 代替値の個数を返します。 |

## リスト ボックスの選択状態の色

このページのすべての情報は、リスト ボックスの選択状態の色について言及しています。

* QlikView ドキュメントの [配色] を [クラシック拡張] に設定します。参照: [選択スタイル設定](https://help.qlik.com/ja-JP/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Document_Properties_General.htm#SelectionAppearance)

* [代替値の表示] がオンに設定されたリスト ボックス参照: [選択状態の表示切替](https://help.qlik.com/ja-JP/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/List_Box.htm#ShowAlternatives)

次の表は、この設定によるリスト ボックスの各選択状態の配色の概要を示しています。

リスト ボックスの配色。

| 状態 | セルの色 | テキスト カラー |
| --- | --- | --- |
| 代替値 | 白色 | 灰色 |
| 選択解除 | 赤色 | 黒 |
| 除外値 | 灰色 | 白色 |
| 可能 | 白色 | 黒 |
| 選択済み | 緑色 | 黒 |
| 選択除外値 | 灰色 | 緑色 |

## 例

以下の例では、異なるリストボックスにロードされた 3 つの項目を使用しています (1 つは First name のもの、1 つは Last name のもの、もう 1 つは Initials のもの)。

例1： First name に選択された値がない場合

`GetExcludedCount  (Initials)`

0を返します。選択項目はありません。

例2： First name で John が選択されている場合

`GetExcludedCount  (Initials)`

5 を返します。Initials には灰色表示の除外値が 5 つあります。JA 値は、First name の John という選択に関連付けられているため、白色で表示されます。

例3： John と Peter が First name で選択されている場合

`GetExcludedCount  (Initials)`

3 を返します。Initials では、John は 1 つの値に関連付けられ、Peter は 2 つの値に関連付けられます。

例4： John と Peter が First name で選択されており、Franc が Last name で選択されている場合

`GetExcludedCount ([First name])`

結果は 3 になります。First name には 3 つの除外値があり、灰色で表示されます。GetExcludedCount() では除外値のみがカウントされます。代替値および選択された除外値はカウントに含まれません。

例5： John と Peter が First name で選択されており、Franc と Anderson が Last name で選択されている場合

`GetExcludedCount  (Initials)`

4 を返します。Initials には灰色表示の除外値が 4 つあります。他の 2 つの値 (JA と PF) は、First name での選択 John および Peter と関連付けられているため、白色または薄い黄色で表示されます。

例6： John と Peter が First name で選択されており、Franc と Anderson が Last name で選択されている場合

`GetExcludedCount  ([Last name])`

3 を返します。Last name には 3 つの除外値があります。Brown、Carr、Elliot。値 Devonshire は代替値なので、カウントには含まれません。

例で使用されているデータ：

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