# String aggregation functions

This section describes string-related aggregation functions.

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.

## String aggregation functions in the load script

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

#### Concat

Concat() is used to combine string values. The script function returns the aggregated string concatenation of all values of the expression iterated over a number of records as defined by a group by clause.

[**concat**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/StringAggregationFunctions/concat.htm)([**concat**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/StringAggregationFunctions/concat.htm)**concat**concat([ distinct ] expression [, delimiter [, sort-weight]][ distinct ] expression [, delimiter [, sort-weight]]))

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

#### FirstValue

FirstValue() returns the value that was loaded first from the records defined by the expression, sorted by a group by clause.

Information noteThis function is only available as a script function.

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

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

#### LastValue

LastValue() returns the value that was loaded last from the records defined by the expression, sorted by a group by clause.

Information noteThis function is only available as a script function.

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

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

#### MaxString

MaxString() finds string values in the expression and returns the last text value sorted over a number of records, as defined by a group by clause.

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

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

#### MinString

MinString() finds string values in the expression and returns the first text value sorted over a number of records, as defined by a group by clause.

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

## String aggregation functions in charts

The following chart functions are available for aggregating strings in charts.

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

#### Concat

Concat() is used to combine string values. The function returns the aggregated string concatenation of all the values of the expression evaluated over each dimension.

[**concat**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/StringAggregationFunctions/concat.htm)({[SetExpression] [DISTINCT] [TOTAL [&lt;fld{, fld}&gt;]] string[, delimiter[, sort\_weight]])

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

#### MaxString

MaxString() finds string values in the expression or field and returns the last text value in the text sort order.

[**maxstring**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/StringAggregationFunctions/maxstring.htm)({[SetExpression] [TOTAL [&lt;fld{, fld}&gt;]]} expr)

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

#### MinString

MinString() finds string values in the expression or field and returns the first text value in the text sort order.

[**minstring**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/ChartFunctions/StringAggregationFunctions/minstring.htm)({[SetExpression] [TOTAL [&lt;fld {, fld}&gt;]]} expr)