# Counter functions

This section describes functions related to record counters during LOAD statement evaluation in the load script. The only function that can be used in chart expressions is RowNo().

Some counter functions do not have any parameters, but the trailing parentheses are however still required.

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.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### autonumber

This script function returns a unique integer value for each distinct evaluated value of expression encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key.

[**autonumber**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/autonumber.htm)(expression[ , AutoID])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### autonumberhash128

This script function calculates a 128-bit hash of the combined input expression values and the returns a unique integer value for each distinct hash value encountered during the script execution. This function can be used for example for creating a compact memory representation of a complex key.

[**autonumberhash128**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/autonumberhash128.htm)(expression {, expression})

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### autonumberhash256

This script function calculates a 256-bit hash of the combined input expression values and returns a unique integer value for each distinct hash value encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key.

Information noteThis function is only available as a script function.

[**autonumberhash256**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/autonumberhash256.htm)(expression {, expression})

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### fieldvaluecount

This script function returns the number of distinct values in a field. fieldname must be given as a string (for example a quoted literal).

[**fieldvaluecount**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/fieldvaluecount.htm)(fieldname)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### IterNo

This script function returns an integer indicating the current iteration within a while clause. The first iteration has number 1. The IterNo function is only meaningful if used together with a while clause.

[**IterNo**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/IterNo.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### RecNo

This script function returns an integer for the number of the currently read row of the current table. The first record is number 1.

[**RecNo**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/RecNo.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### RowNo - script function

This function returns an integer for the position of the current row in the resulting QlikView internal table. The first row is number 1.

[**RowNo**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/RowNo.htm)( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/CounterFunctions/counter-functions.htm)

#### RowNo - chart function

RowNo() returns the number of the current row within the current column segment in a table. For bitmap charts, RowNo() returns the number of the current row within the chart's straight table equivalent.

[**rowno**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/InterRecordFunctions/rowno.htm)([TOTAL])