Skip to main content

MinString - chart function

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


MinString({[SetExpression] [TOTAL [<fld {, fld}>]]} expr)

Return data type: dual


  • expr: The expression or field containing the data to be measured..
  • SetExpression: By default, the aggregation function will aggregate over the set of possible records defined by the selection. An alternative set of records can be defined by a set analysis expression.
  • TOTAL: If the word TOTAL occurs before the function arguments, the calculation is made over all possible values given the current selections, and not just those that pertain to the current dimensional value, that is, it disregards the chart dimensions. The TOTAL qualifier may be followed by a list of one or more field names within angle brackets <fld>. These field names should be a subset of the chart dimension variables.

    Defining the aggregation scope


Examples and results
Example Result


There are three values of 20000 for the dimension Amount: two of Gamma (on different dates), and one of Beta. The result of the measure MinString (Team) is therefore Beta, because this is the first value in the sorted strings.


2013/11/01 is the earliest Date value of the three associated with the dimension Amount. This assumes your script has the SET statement SET DateFormat='YYYY-MM-DD';

Data used in examples:


LOAD * inline [











] (delimiter is '|');

Example data in table form
SalesGroup Amount MaxString(Team) MaxString(Date)
East 14000 Delta 2013/08/01
East 20000 Gamma 2013/11/01
East 25000 Alpha 2013/07/01
West 14000 Eta 2013/10/01
West 17000 Epsilon 2013/09/01
West 19000 Zeta 2013/06/01
West 23000 Theta 2013/12/01

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: