Script functions within the Qlik Sense app script are used to transform and aggregate data. This article will list the types of functions available and their purpose. Click on the button below each function type to see the full list of functions of this type.

Many functions can be used in both, the script and the charts identically. This particular page lists script functions only. See chart functions here. Note that there are many working Qlik Sense functions. Functions are subject to being updated or phased out. Please see the Qlik Sense help pages here for an up-to-date list of functions.

Aggregation Functions

Aggregation functions group multi-row data into a single row based on some grouping.

The functions are calculated by looping through the table rows and working out the result for each given group. Here are some examples of aggregation functions:

AvgThis function returns the average of numeric values within a field for a group.
CountThis function returns the count of values within a field for a group.
MaxThis function returns the max numeric value within a field for a group.
MinThis function returns the min numeric value within a field for a group.
SumThis function returns the total of numeric values within a field for a group.

See more on aggregation functions

Conditional Functions

Conditional functions evaluate specified conditions and return a result based on the outcome of the condition evaluation. For example, if a condition evaluates to outcome 1, return ‘a’; otherwise, return ‘b’. Here are some examples of conditional functions:

CoalesceThis function returns the first non-NULL value of the expressions used within the function.
IfThis function returns the value based on whether the condition evaluates to true or false. The return parameters are specified for both condition results.
MatchThis function matches the first input value with all the subsequent ones and returns the position of the match. For example, if the value matched the second input, 2 will be returned. The matching is case-sensitive.
PickThis function returns the nth value from the list given. The position of the value to be returned is given first followed by the list of values. Expressions can be used in the function.
WildMatchThis function matches the first input value with all the subsequent ones and returns the position of the match. For example, if the value matched the second input, 2 will be returned. The matching is case-insensitive. WildMatch permits the use of wildcard characters.

See more on conditional functions

Counter Functions

Counter functions count records within a table to return results. Some do not require any input values at all. Here are some examples of counter functions:

AutoNumberThis function returns a unique integer for each distinct value encountered.
RecNoThis function returns the number of data rows in the source data that is being returned. The numbering starts with 1.
RowNoThis function returns the number of data row in the resulting data table that is being returned. The numbering starts with 1.

See more on counter functions

Date & Time Functions

These functions are used to transform the date and time values. Qlik Sense reads dates and processes these functions based on the numerical value of the date. The number represents days since the 30th December 1899. Here are some examples of date & time functions:

AddYearsThis function returns a date occurring n years before or after an input date specified.
MonthThis function returns a dual value of the month of the given date. A dual value means that the month is represented visually as per the app parameters, usually in the format of ‘MMM’ yet Qlik Sense reads it as an integer for sorting purposes.  
MonthStartThis function returns the timestamp of the month’s start to the first millisecond.
TodayThis function returns the date of the current date time. Current being when a specified action last took place such as an app reload, app open or a function call.
YearThis function returns the integer of the year of a given date. 

See more on date & time functions

Exponential and Logarithmic Functions

These functions are used in calculations to transform data. Here are some examples of these functions:

ExpThis function returns a result that is equivalent to the formula e^x, where e is the natural logarithm.
LogThis function returns a result that is the natural logarithm of the integer.
SqrThis function returns a result to the formula x^2 (x squared).
SqrtThis function returns the square root of the integer.

See more on exponential & logarithmic functions

File Functions

These functions return information about the file currently being read by Qlik Sense as part of the script execution. Here are some examples of file functions:

FileNameThis function returns the name and extension of the file currently being read. The path is not included.
FilePathThis function returns the path to the file currently being read. The name and extension of the file are also included.
FileSizeThis function returns the size of a specified file. The size is given in bytes.
FileTimeThis function returns the last modified date time of a specified file. The date time is given in UTC time zone.

See more on file functions

Financial Functions

These functions are used to calculate payments and interest rates. Here are some examples of financial functions:

FvThis function returns the future value of an investment.
PmtThis function returns the payment required for a loan given a specific interest rate and the number of periods.
PvThis function returns the present value of an investment.

See more on financial functions

Formatting Functions

These functions are used to format the way integers are displayed in visualisations. Here are some examples of formatting functions:

DateThis function applies a date format to the field.
MoneyThis function formats a field as a monetary field.
NumThis function formats a field as a number.

See more on formatting functions

Geospatial Functions

These functions are for handling data when using map visualisations. They apply to geospatial data. Some of the functions are aggregating functions. Here are some examples of geospatial functions:

GeoBoundingBoxThis function reads the coordinates in a field and returns coordinates that represent a rectangle area that fits all the given coordinates.
GeoMakePointThis function returns tag points given the longitude and latitude given.
GeoProjectThis function applies a projection to a geometry.

See more on geospatial functions

Interpretation Functions

These functions are used to inform Qlik on how to read a string if it represents a numeric value. Here are some examples of interpretation functions:

Date#This function converts a string to a specific date format so that Qlik can interpret it as a date.
Money#This function converts a string to a specific monetary format so that Qlik can interpret it as a monetary value.
Num#This function converts a string to a specific numeric format so that Qlik can interpret it as a number.

See more on interpretation functions

Inter-record Functions

These functions are used to tell Qlik to use or look at values from rows other than the one currently being read. Some functions can be used to look at values in other previously loaded tables. Here are some examples of inter-record functions:

ExistsThis function checks whether a specific value in a field has already been loaded.
FieldIndexThis function returns the position of a value in a specific field.
PeekThis function returns a value in a specific field in a given table and row number.
PreviousThis function returns a value in the previous row. The result only includes rows that have not been excluded using a where clause.

See more on inter-record functions

Logical Functions

These functions are used to check specific logical criteria. Here are some examples of logical functions:

IsNumThis function checks whether the value is numeric or not. The function returns true (-1) or false (0).

See more on logical functions

Mapping Functions

These functions are used to apply a previously loaded mapping table to a field. Doing so allows for mapping values from the mapping table to the field values. Here are some examples of mapping functions:

ApplyMapThis function maps a previously loaded mapping table to a field’s values.

See more on mapping functions

Math Functions

These functions are used for mathematical applications. Here are some examples of math functions:

EThis function returns the ‘e’ number, i.e. the base of the natural logarithm.
PiThis function returns the value of Pi.
RandThis function returns a random number between 0 and 1.

See more on math functions

NULL Functions

These functions are used for identifying or interacting with NULLs. Here are some examples of NULL functions:

NullThis function returns a NULL value.

See more on NULL functions

Numeric Functions

These functions are general number functions. Here are some examples of numeric functions:

CeilThis function rounds up the number to the specified increment.
DivThis function returns the whole number part only of a result of a division.
EvenThis function returns true (-1) if the integer is an even number or false (0) if it’s odd. 
FloorThis function rounds down the number to the specified increment.
OddThis function returns true (-1) if the integer is an odd number or false (0) if it’s even. 

See more on numeric functions

Range Functions

These functions are used for producing a value using a range of values. For example, getting a max value out of multiple fields. Here are some examples of range functions:

RangeAvgThis function returns the average of a range of values.
RangeCountThis function returns the count of a range of values.
RangeMaxThis function returns the max of a range of values.
RangeMinThis function returns the min of a range of values.
RangeSumThis function returns the sum of a range of values.

See more on range functions

Statistical Distribution Functions

These functions are used for calculating the distribution of a given set of values. Here are some examples of these functions:

BinomDistThis function returns the accumulated probability of the binomial distribution.
ChiDistThis function returns the accumulated probability of the chi2 distribution.
FDistThis function returns the accumulated probability of the f distribution.
NormDistThis function returns the normal distribution for the mean and standard deviation given.

See more on statistical distribution functions

String Functions

These functions are used for transforming string values. Here are some examples of string functions:

CapitalizeThis function returns the string values in a capitalised form, i.e. upper case first letter of each word.
IndexThis function returns the position of a specified substring within a string as an integer.
LenThis function returns the length of a string.
ReplaceThis function returns a string after replacing the specified substring with the required substring.
UpperThis function returns the string in upper case.

See more on string functions

System Functions

These functions give information about the environment and the app. Here are some examples of system functions:

AuthorThis function returns the name of the app author.
DocumentNameThis function returns the name of the Qlik app, including the extension.
DocumentPathThis function returns the path to the Qlik app.
DocumentTitleThis function returns the title of the Qlik app.
ReloadTimeThis function returns the date and time of when the app was last reloaded.

See more on system functions

Table Functions

These functions give information about the data table being read. Here are some examples of table functions:

NoOfFieldsThis function returns the number of fields in a table.
NoOfRowsThis function returns the number of rows in a table.

See more on table functions

Trigonometric Functions

These functions are designed to perform trigonometric operations. Here are some examples of trigonometric functions:

CosThis function returns the cosine of the integer.
SinThis function returns the sine of the integer.
TanThis function returns the tangent of the integer.

See more on trigonometric functions