# 欄位函數

這些函數僅可用於圖表運算式。

欄位函數會傳回識別欄位選項不同層面的整數或字串。

使用每個函數中的下拉式功能表，以查看每個函數的簡要描述及語法。按一下語法描述中的函數名稱，以取得進一步詳細資料。

## 計數函數

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetAlternativeCount

GetAlternativeCount() 用來尋找已識別欄位中的替代 (淺灰色) 值的數目。

[**getalternativecount**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getalternativecount.htm) (field\_name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetExcludedCount

GetExcludedCount() 用來尋找已識別欄位中的已排除相異值的數目。僅計入排除 (深灰色) 欄位。不會計入替代 (淺灰色) 和所選的排除 (有核取記號的深灰色) 值。

[**getexcludedcount**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getexcludedcount.htm)(field\_name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetPossibleCount

GetPossibleCount() 用來尋找已識別欄位中的可能值的數目。如果已識別的欄位包括選項，則會計算已選取的 (綠色) 欄位。否則，會計算相關聯的 (白色) 值。

[**getpossiblecount**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getpossiblecount.htm)(field\_name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetSelectedCount

GetSelectedCount() 會尋找欄位中已選取的 (綠色) 值的數目。

[**getselectedcount**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getselectedcount.htm) (field\_name [, include\_excluded])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetStateCounts

GetStateCounts() 圖表函數用於計算與指定選取狀態相符的唯一值的總數。

[**getstatecounts**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getstatecounts.htm) (field\_name, state\_name [, state\_type1,...state\_typeN])

## 欄位與選項函數

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetCurrentSelections

GetCurrentSelections() 傳回應用程式中目前選取項目的清單。如果選取項目是改為使用搜尋方塊中的搜尋字串來進行，GetCurrentSelections() 會傳回搜尋字串。

[**getcurrentselections**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getcurrentselections.htm)([record\_sep [,tag\_sep [,value\_sep [,max\_values]]]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetFieldSelections

GetFieldSelections() 傳回 string 及欄位中的目前選項。

[**getfieldselections**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getfieldselections.htm) ( field\_name [, value\_sep [, max\_values]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectDimension

GetObjectDimension() 會傳回維度名稱。Index 為選用整數，代表應傳回的維度。

[**getobjectdimension**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getobjectdimension.htm) ([index])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectField

GetObjectField() 傳回維度的 欄位運算式。Index 是選用整數，表示應傳回的維度。

[**GetObjectField**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/GetObjectField.htm) ([index])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectMeasure

GetObjectMeasure() 可傳回量值名稱。Index 是代表應傳回之量值的選用整數。

[**getobjectmeasure**](https://help.qlik.com/zh-TW/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getobjectmeasure.htm) ([index])