# Field functions

These functions can only be used in chart expressions.

Field functions either return integers or strings identifying different aspects of field selections.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

## Count functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetSelectedCount

GetSelectedCount() finds the number of selected (green) values in a field.

[**getselectedcount**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getselectedcount.htm) (field\_name [, include\_excluded])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetAlternativeCount

GetAlternativeCount() is used to find the number of alternative (white cell with gray text) values in the identified field.

[**getalternativecount**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getalternativecount.htm) (field\_name)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetPossibleCount

GetPossibleCount() is used to find the number of possible (white) values in the identified field. If the identified field includes selections, then the selected (green) fields are also counted.

[**getpossiblecount**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getpossiblecount.htm)(field\_name)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetExcludedCount

GetExcludedCount() finds the number of excluded distinct values in the identified field. Only excluded (gray cell with white text) values are counted. Alternative (white cell with gray text) and selected excluded (gray cell with green text) values are not counted.

[**getexcludedcount**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getexcludedcount.htm)(field\_name)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

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

[**GetNotSelectedCount**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/GetNotSelectedCount.htm)(fieldname [, includeexcluded=false])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetStateCounts

The GetStateCounts() chart function is used to calculate the total number of unique values matching the specified selection states.

[**getstatecounts**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getstatecounts.htm) (field\_name, state\_name [, state\_type1,...state\_typeN])

## Field and selection functions

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetCurrentField

GetCurrentField() is used to find the currently active field in the specified group.

[**getcurrentfield**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getcurrentfield.htm) (group\_name)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetCurrentSelections

GetCurrentSelections() returns the current selections in the document.

[**getcurrentselections**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getcurrentselections.htm)([record\_sep [,tag\_sep [,value\_sep [,max\_values]]]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetFieldSelections

GetFieldSelections() returns a string with the current selections in a field.

[**getfieldselections**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getfieldselections.htm) ( field\_name [, value\_sep [, max\_values]])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectField

GetObjectField() returns the name of the dimension. Index is an optional integer denoting the dimension that should be returned.

[GetObjectField](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/GetObjectField.htm) ([index])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectMeasure

GetObjectMeasure() returns the name of the measure. Index is an optional integer denoting the measure that should be returned.

[**getobjectmeasure**](https://help.qlik.com/en-US/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/ChartFunctions/FieldFunctions/getobjectmeasure.htm) ([index])