Functions Guide

Omniscope Functions and Formulae

Define calculated formula fields in your data sets

This section expands on the Formula Editior Omniscope documentation of functions available for use in formula fields to calculate values based on values in other columns. Most of the functions/syntax are the same as those used in spreadsheets like Excel, but there are also powerful Omniscope-specific SUBSET functions that perform operations on evaluated data subsets, both aggregated and disaggregated.

See also:  Useful formulae   Guide to SUBSET functions    Deprecated functions   


Function
Usage
Description
ABS ABS(number) Returns the absolute value of a number, a number without its sign.
ACOS ACOS(number) Returns the arccosine of a number, in radians in the range 0 to Pi. The arccosine is the angle whose cosine is Number.
ACOSH ACOSH(number) Returns the inverse hyberbolic cosine of a number.
ALLRECORDCOUNT
(Omniscope 2.6+)
ALLRECORDCOUNT Evaluates to the total number of records (rows) in all data, before any filtering or in-view aggregation has been applied.
AND AND(logical1, logical2, ...) Checks whether all arguments are TRUE, and returns TRUE if all arguments are TRUE.
ASIN ASIN(number) Returns the arcsine of a number in radians, in the range -Pi/2 to Pi/2.
ASINH ASINH(number) Returns the inverse hyperbolic sine of a number.
ATAN ATAN(number) Returns the arctangent of a number in radians, in the range -Pi/2 to Pi/2.
ATANH ATANH(number) Returns the inverse hyperbolic tangent of a number.
AVG AVG(value1, value1, ...) Returns the average (arithmetic mean) of its arguments.
BUCKET
(Omniscope 2.6+)
BUCKET(value, width, unit, format)

In scripts:
bucket(value, width, unit, format)
Retrieves a range for a date or a number as a text value in the format "A to B".
For numbers, use BUCKET(value, width, format); for dates use BUCKET(value, width, unit, format). In either case, "format" is optional.
Date units can be one of: "year", "month", "week", "day", "hour", "minute", "second", "millisecond".

Numeric examples:
BUCKET(5, 10) = '0 to 10'
BUCKET(0.08, 0.1) = '0 to 0.1'
BUCKET(0.1, 0.1) = '0.1 to 0.2'
BUCKET(0, 0.1) = '0 to 0.1'
BUCKET(0.11, 0.1) = '0.1 to 0.2'
BUCKET(1002, 10) = '1000 to 1010'
BUCKET(10000, 11) = '9999 to 10010'

Date examples where field1 is 10 Feb 2007 12:43:
BUCKET([field1], 2, "hours") = '10 Feb 2007 12:00 to 10 Feb 2007 14:00'
BUCKET([field1], 2, "hours", "HH:mm") = '12:00 to 14:00'
BUCKET([field1], 2, "months", "dd MMM yyyy") = '01 Jan 2007 to 01 Mar 2007'
BUCKET([field1], 2, "years", "dd MMM yyyy") = '01 Jan 2006 to 01 Mar 2008'
BUCKET([field1], 12, "seconds", "HH:mm ss") = '12:43 00 to 12:43 12'
CHOOSE CHOOSE(index_num, value1, value2, ...) Chooses a value from a list of values, based on an index number (beginning at 1).
COMBIN COMBIN(number, number_chosen) Returns the number of combinations for a given number of items.
CONTAINS
(Omniscope 2.6+)
CONTAINS(text, sub_text) Returns true if [sub_text] occurs anywhere within [text] (case insensitive).
CONVERT_LATLONG_TO_OSGBX
(Omniscope 2.7+)
CONVERT_LATLONG_TO_OSGBX(lat, lon) Converts coordinates from the latitude value in WGS 84 (GPS lat/lon) to British National Grid (OSGB 36) X.
CONVERT_LATLONG_TO_OSGBY
(Omniscope 2.7+)
CONVERT_LATLONG_TO_OSGBY(lat, lon) Converts coordinates from the latitude value in WGS 84 (GPS lat/lon) to British National Grid (OSGB 36) Y.
CONVERT_OSGB_TO_LAT
(Omniscope 2.5+)
CONVERT_OSGB_TO_LAT(osgbX, osgbY) Converts coordinates from British National Grid (OSGB 36) to the latitude value in WGS 84 (GPS lat/lon).
CONVERT_OSGB_TO_LONG
(Omniscope 2.5+)
CONVERT_OSGB_TO_LONG(osgbX, osgbY) Converts coordinates from British National Grid (OSGB 36) to the longitude value in WGS 84 (GPS lat/lon).
COS COS(number) Returns the cosine of an angle.
COSH COSH(number) Returns the hyperbolic cosine of a number.
CURRENTROW CURRENTROW() Evaluates to the row number of the record being evaluated. Numbering starts at 1.
DATE
(Omniscope 2.7+)
DATE(year, month, day, hour, minute, second, millisecond, timezone)

In scripts:
date(year, month, day, hour, minute, second, millisecond, timezone)
Creates a date using numerical arguments.
If omitted or null, the first value for each arguments is used.
So, if year is null, year 1 is used.
If month is null or omitted, January is used.
Etc.
BC dates are not supported.
Illegal dates such as day 29 Feb on a non-leap year will be rolled over.
Timezone is a text value in the format "GMT-8:00" or "PST"; if omitted, the local timezone is used.
DATEADD
(Omniscope 2.5+)
DATEADD(date, number, unit)

In scripts:
dateAdd(date, number, unit)
Adds a specified number of a specified unit to a date.
To subtract, use a negative number.
Unit is optional; if not specified, "day" is assumed, otherwise it should be specified as:
"year", "month", "week", "day", "hour", "minute", "second", "millisecond".
DATEDIFF DATEDIFF(date1, date2, unit, approximate)

In scripts:
dateDiff(date1, date2, unit, approximate)
Establishes the difference between two dates, as a decimal number of a specified unit (optional, default: "day").
If date2 is before date1, the result will be negative.
E.g. the decimal number of weeks between two dates.
Units should be specified as:
"year", "month", "week", "day", "hour", "minute", "second", "millisecond".

You can optionally choose approximate date difference for faster value calculation by specifying "true" for "approximate". Approximate date difference divides elapsed time between the two dates by the typical unit length (e.g. 30 days for days-in-month).
DATETOTEXT
(Omniscope 2.6+ (for time zone argument))
DATETOTEXT(date_value, custom_format, time zone value)

In scripts:
dateToText(date_value, custom_format, time zone value)
Converts a Date into text, optionally using a custom date format and time zone.
For more information please click here.
DATEUNIT
(Omniscope 2.5+)
DATEUNIT(date, unit)

In scripts:
dateUnit(date, unit)
Retrieves a specified unit from a date as a numeric value.
For example, the date "12 Feb 2006" has 12 as the "day" unit.
Unit is optional; if not specified, "day" is assumed, otherwise it should be specified as:
"year", "month", "week", "day", "hour", "minute", "second", "millisecond".
NB. "days" is interpreted as "day of month", "weeks" as "week of year", and "hours" as "hour of day (24)".
DATEVALUE DATEVALUE(text) Converts a text string that represents a date to a date. For more options, see TEXTTODATE.
DECLARE
(Omniscope 2.6+)
DECLARE(name1, expression1, name2, expression2, name3, expression3..., sub_formula) Declares one or more named values, each with a value expression, for repeated use in a sub-formula.
The names should not be quoted.
For more information, see DECLARE function.
E E() Euler's number, e, also called the base of natural logarithms.
ENDSWITH
(Omniscope 2.6+)
ENDSWITH(text, sub_text) Returns true if [sub_text] occurs in the end of [text] (case insensitive).
EQUIV
(Omniscope 2.6+)
EQUIV(value1, value2) Returns true if [value1] is equivalent to [value2] (automatically converting between text, numbers and dates to attempt to find a match).
EXEC EXEC(command) Executes an operating system command, resulting in a text value containing the command's output. Requires experimental features to be enabled, and the application-wide setting "Permit EXEC/SCRIPT functions to execute" tobe enabled in each new application instance.
EXP EXP(number) Returns e raised to the power of a given number.
FACT FACT(number) Returns the factorial of a number, equal to 1*2*3*...*Number.
FIELDFORMAT FIELDFORMAT(value, field) Converts any value into the text equivalent, using a field format.
Usage examples:
FIELDFORMAT(424, [Field 1]) = "424.00"
GEOCODELAT
(Omniscope 2.6+)
GEOCODELAT(location, provider) Converts a textual location into a latitude (Y) coordinate. The 2nd parameter "provider" is optional and can be one of: yahoo, cloudmade. If not specified, yahoo is used.
GEOCODELON
(Omniscope 2.6+)
GEOCODELON(location, provider) Converts a textual location into a longitude (X) coordinate. The 2nd parameter "provider" is optional and can be one of: yahoo, cloudmade. If not specified, yahoo is used.
HTTPREDIRECT HTTPREDIRECT(url) Retrieves the HTTP redirect target for a URL, if the server provides one.
IF
(Use of extended form requires Omniscope 2.5+)
IF(logical_test, value_if_true, value_if_false) or IF(test1, value1, test2, value2, test3, value3..., else_value) Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
If the longer form is used, returns value1 if test1 is true, otherwise returns value2 if test2 is true, otherwise returns value3 if test3 is true..., otherwise returns else_value.

For example:
IF(
    [Coupon]<6, "less than 6",
    [Coupon]<7, "6 to 7",
    [Coupon]<8, "7 to 8",
    "8+"
)
INTCEIL INTCEIL(number) Rounds a number up to the nearest integer.
INTERSECTION
(Omniscope 2.6+)
INTERSECTION(subset1, subset2, ...)

In scripts:
intersection(subset1, subset2, ...)
Returns the data subset which is the intersection of records for all data subset arguments. If a record is present in ALL supplied subsets, it will be present in the result.
WARNING: this is an experimental function that has not been optimised for performance. Use alternative solutions such as extra formulas and the SUBSET function if performance is unacceptable.
For more information, please visit SUBSET functions.
INTFLOOR INTFLOOR(number) Rounds a number down to the nearest integer.
INTROUND INTROUND(number) Rounds a number to the nearest integer.
INVERSE
(Omniscope 2.6+)
INVERSE(subset)

In scripts:
inverse(subset)
Inverts the set of included records of a data subset. All records included in the subset supplied will be excluded in the result, and vice versa.
WARNING: this is an experimental function that has not been optimised for performance. Use alternative solutions such as extra formulas and the SUBSET function if performance is unacceptable.
For more information, please visit SUBSET functions.
ISO_COUNTRY_NAME
(Omniscope 2.5+)
ISO_COUNTRY_NAME(code) Converts an ISO country code into readable form.
ISO_LANGUAGE_NAME
(Omniscope 2.5+)
ISO_LANGUAGE_NAME(code, show_country) Converts an ISO language code into readable form.
The function uses two arguments:

code. The ISO language code. This can be either a 2-letter code language code, 2-letter language/country code or a 3-letter code.

show_country. Optional argument. If this is set to true and a 2-letter language/country code is provided the country will be shown in brackets after the language. The default value is true.
LASTDAYOFMONTH
(Omniscope 2.6+)
LASTDAYOFMONTH(date_value) Returns last day of month for a given date. Date value should include month and year value.
LAT_LONG_DISTANCE
(Omniscope 2.7+)
LAT_LONG_DISTANCE(lat1, lon1, lat2, lon2) Returns the surface distance (in KM) from one latitude/longitude point to another.
LEFT LEFT(text, num_chars) Returns the specified number of characters from the start of a text string.
LEN LEN(text) Returns the number of characters in a text string.
LG LG(number) Returns the base-2 logarithm of a number.
LN LN(number) Returns the natural logarithm of a number.
LOG LOG(number, base) Returns the logarithm of a number to the base you specify.
LOOKUPCSVCELL LOOKUPCSVCELL(csv_data, row, column, has_headers, locale) Parses and reads CSV data, which may or may not contain a header row. Returns the cell specified (NB. row/column numbers start at zero). This will not perform well for large numbers of calculations or large CSV data.
The fifth arguement is optional and you can use it to override the default locale. For an example if the default is italian and you are loading a CSV file with english decimals, add "en".
LOWER LOWER(text) Converts all letters in a text string to lowercase.
MAX MAX(value1, value1, ...) Returns the largest value in a set of values.
MID MID(text, start_num, num_chars) Returns the specified number of characters from the middle of a text string, given a starting position and length.
MIN MIN(value1, value1, ...) Returns the smallest number in a set of values.
MOD MOD(number, divisor) Returns the remainder after a number is divided by a divisor.
NOT NOT(logical) Changes FALSE to TRUE, or TRUE to FALSE.
NOW NOW Returns the current date/time.
NUM_OF_TOKENS NUM_OF_TOKENS(text, token_separator) Returns the number of tokens (split by a single character such as a comma) in a text value.
NUMVALUE NUMVALUE(text) Converts a text string that represents a number to a number.
OR OR(logical1, logical2, ...) Checks whether any arguments are TRUE, and returns TRUE or FALSE. Returns FALSE only if all arguments are FALSE.
PI PI() Returns the value of Pi, 3.141592653589793, accurate to over 15 digits.
POWER POWER(number, power) Returns the result of a number raised to a power.
PROPER PROPER(text) Converts a text string to proper case; the first letter in each word in uppercase, and all other letters to lowercase.
RAND RAND() or RAND(seed) Returns a random number greater than or equal to 0 and less than 1, evenly distributed. The result changes on every recalculation, unless a seed value (any number) is specified, in which case the number generated is always the same for a given seed.
RANK
(Use of dataSubset argument requires Omniscope 2.5+)
RANK(value, field, ascending, includeNulls, dataSubset) Returns the rank of a value within the field specified.

This is the value position within the ordered field values.
If ascending is not specified, or false, the rank is against a descending order (higher values give better rank, with the highest number giving rank 1).
If the value is NULL, or not present in the list, NULL is returned, unless includeNulls is specified as true, in which case empty cells in the list will be considered.
If dataSubset is specified, the RANK is calculated for a subset of the data which can be specified using the SUBSET function.

Valid argument combinations without data subset:
RANK(field) (shorthand for RANK(field, field))
RANK(value, field)
RANK(value, field, ascending)
RANK(value, field, ascending, includeNulls)

Valid argument combinations with data subset:
RANK(value, field, dataSubset)
RANK(value, field, ascending, dataSubset)
RANK(value, field, ascending, includeNulls, dataSubset)

For more information, please visit SUBSET functions.
READRES READRES(file_path_or_url, max_cache_age_seconds) Reads the text contents from a file or URL. If the maximum cache age in seconds is not specified, it will be assumed to be 1 minute. Downloaded data will be cached for this period. Use -1 to disable caching.
RECORDCOUNT
(Omniscope 2.5+)
RECORDCOUNT(subset)

In scripts:
recordCount(subset)
Evaluates to the number of records (rows) in the all data (if subset is not specified), or a subset (if subset is specified). The subset should be a data subset as evaluated using the SUBSET function.
REFVAL
(Omniscope 2.6+)
REFVAL(field_name)

In scripts:
refVal(field_name)
Looks up the value of a field or variable by its name. The name can be dynamically determined, such as by concatenating text and/or using variables.
REPLACE REPLACE(old_text, start_num, num_chars, new_text) Replaces part of a text string with a different text string.
REPLACEREGEX
(Omniscope 2.6+)
REPLACEREGEX(text, regular_expression, replace_text, use_empty_if_no_match) Replaces text matching a regular expression. In the replace text, use "$1" to refer to group 1 in the regular expression, and "$$" to mean a single dollar character. If use_empty_if_no_match (optional, default false) is true, and the expression does not match, results in null. For more information on regular expressions, see Regular expressions guide
REPT REPT(text, number_times) Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
RIGHT RIGHT(text, num_chars) Returns the specified number of characters from the end of a text string.
ROWINDEXSUBSET
(Omniscope 2.7+)
ROWINDEXSUBSET(rowIndex, operator)

In scripts:
rowIndexSubset(rowIndex, operator)
Results in a subset matching the row index(es) specified. Row indexes start from 1.
Custom operator should be one of: "<=", "=", ">", "<", ">=", "<>"
If not specified, "=" (equals) is used.
RUNNINGTOTAL
(Omniscope 2.6+)
RUNNINGTOTAL(field, subset) Evaluates to the running total in 'field' for all data (if subset is not specified), or a subset (if subset is specified). The subset should be a data subset as evaluated using the SUBSET function.
SCRIPT
(Omniscope 2.6+; only with Java 6; some scripting functions require Omniscope 2.7+)
SCRIPT(script, var1Name, var1Value, var2Name, var2Value, var3Name, var3Value..., timeout) Executes a javascript expression. Requires experimental features to be enabled, and the application-wide setting "Permit EXEC/SCRIPT functions to execute" tobe enabled in each new application instance. Requires Java 6, included with the full Omniscope installer. Supports core Javascript 1.5, but not browser-related objects.
The script will be terminated after 10 seconds unless "timemout" is specified (in milliseconds).
Note: you can use back-quotes (`) instead of normal quotes to quote your script, such as: `1 + 2`. Unlike with normal quotes, back-quoted text can contain any other character including backslash. For literal back-quotes, use two, e.g. SCRIPT(`var x = "Her name was ``Jane``";`)
For more information please click here.
SEARCH SEARCH(find_text, within_text, start_num) Returns the number of the character at which a specific character or text string is first found, reading from left to right (not case-sensitive). The first character is numbered 1. Returns null if not found.
SEARCHREGEX SEARCHREGEX(reg_expr, within_text, start_num) Returns the number of the character at which a regular expression is first found, reading from left to right (not case-sensitive). The first character is numbered 1. Returns null if not found. For more information on regular expressions, see Regular expressions guide
SIGN SIGN(number) Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative.
SIN SIN(number) Returns the sine of an angle.
SINH SINH(number) Returns the hyperbolic sine of a number.
SQRT SQRT(number) Returns the square root of a number.
STARTSWITH
(Omniscope 2.6+)
STARTSWITH(text, sub_text) Returns true if [sub_text] occurs in the beginning of [text] (case insensitive).
SUBSET
(Omniscope 2.5+; Omniscope 2.6+ for custom operators)
SUBSET(field, field_value, field_operator)

In scripts:
subset(field, field_value, field_operator)
Evaluates to a subset of the data. Normally used only as an argument to another function.
Either:
(a) all records (if no arguments are specified); or
(b) a current subset of records (if field is specified); or
(c) another subset of records (if field and field_value are specified); or
(d) another subset of records, using a custom operator (if all arguments are specified).
Custom operator should be one of: "<=", "=", ">", "<", ">=", "<>"
For more information, please visit SUBSET functions.
SUBSET2
(Omniscope 2.5+; Omniscope 2.6+ for custom operators)
SUBSET2(field_1, field_2, field_1_value, field_2_value, field_1_operator, field_2_operator)

In scripts:
subset2(field_1, field_2, field_1_value, field_2_value, field_1_operator, field_2_operator)
Evaluates to a subset of the data. Normally used only as an argument to another function.
Either:
(a) a current subset of records (if field_N is specified); or
(b) another subset of records (if field_N and field_N_value are specified); or
(c) another subset of records, using a custom operator (if all arguments are specified).
Custom operator should be one of: "<=", "=", ">", "<", ">=", "<>"
For more information, please visit SUBSET functions.
Deprecated - please use the SUBSET and INTERSECTION functions instead.
SUBSET3
(Omniscope 2.5+; Omniscope 2.6+ for custom operators)
SUBSET3(field_1, field_2, field_3, field_1_value, field_2_value, field_3_value, field_1_operator, field_2_operator, field_3_operator)

In scripts:
subset3(field_1, field_2, field_3, field_1_value, field_2_value, field_3_value, field_1_operator, field_2_operator, field_3_operator)
Evaluates to a subset of the data. Normally used only as an argument to another function.
Either:
(a) a current subset of records (if field_N is specified); or
(b) another subset of records (if field_N and field_N_value are specified); or
(c) another subset of records, using a custom operator (if all arguments are specified).
Custom operator should be one of: "<=", "=", ">", "<", ">=", "<>"
For more information, please visit SUBSET functions.
Deprecated - please use the SUBSET and INTERSECTION functions instead.
SUBSET4
(Omniscope 2.5+; Omniscope 2.6+ for custom operators)
SUBSET4(field_1, field_2, field_3, field_4, field_1_value, field_2_value, field_3_value, field_4_value, field_1_operator, field_2_operator, field_3_operator, field_4_operator)

In scripts:
subset4(field_1, field_2, field_3, field_4, field_1_value, field_2_value, field_3_value, field_4_value, field_1_operator, field_2_operator, field_3_operator, field_4_operator)
Evaluates to a subset of the data. Normally used only as an argument to another function.
Either:
(a) a current subset of records (if field_N is specified); or
(b) another subset of records (if field_N and field_N_value are specified); or
(c) another subset of records, using a custom operator (if all arguments are specified).
Custom operator should be one of: "<=", "=", ">", "<", ">=", "<>"
For more information, please visit SUBSET functions.
Deprecated - please use the SUBSET and INTERSECTION functions instead.
SUBSET5
(Omniscope 2.5+; Omniscope 2.6+ for custom operators)
SUBSET5(field_1, field_2, field_3, field_4, field_5, field_1_value, field_2_value, field_3_value, field_4_value, field_5_value, field_1_operator, field_2_operator, field_3_operator, field_4_operator, field_5_operator)

In scripts:
subset5(field_1, field_2, field_3, field_4, field_5, field_1_value, field_2_value, field_3_value, field_4_value, field_5_value, field_1_operator, field_2_operator, field_3_operator, field_4_operator, field_5_operator)
Evaluates to a subset of the data. Normally used only as an argument to another function.
Either:
(a) a current subset of records (if field_N is specified); or
(b) another subset of records (if field_N and field_N_value are specified); or
(c) another subset of records, using a custom operator (if all arguments are specified).
Custom operator should be one of: "<=", "=", ">", "<", ">=", "<>"
For more information, please visit SUBSET functions.
Deprecated - please use the SUBSET and INTERSECTION functions instead.
SUBSET_EMPTYCOUNT
(Omniscope 2.5+)
SUBSET_EMPTYCOUNT(stat_field, subset_dataset)

In scripts:
subset_emptyCount(stat_field, subset_dataset)
Calculates the statistical function [Number of empty values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_FIRST
(Omniscope 2.6+)
SUBSET_FIRST(stat_field, subset_dataset)

In scripts:
subset_first(stat_field, subset_dataset)
Calculates the statistical function [The first value (or null) in the original data order] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_LAST
(Omniscope 2.6+)
SUBSET_LAST(stat_field, subset_dataset)

In scripts:
subset_last(stat_field, subset_dataset)
Calculates the statistical function [The last value (or null) in the original data order] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_MAX
(Omniscope 2.5+)
SUBSET_MAX(stat_field, subset_dataset)

In scripts:
subset_max(stat_field, subset_dataset)
Calculates the statistical function [Maximum value (highest or last)] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_MEAN
(Omniscope 2.5+)
SUBSET_MEAN(stat_field, subset_dataset)

In scripts:
subset_mean(stat_field, subset_dataset)
Calculates the statistical function [Mean (average) of values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_MEDIAN
(Omniscope 2.5+)
SUBSET_MEDIAN(stat_field, subset_dataset)

In scripts:
subset_median(stat_field, subset_dataset)
Calculates the statistical function [Median (middle) of values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_MIN
(Omniscope 2.5+)
SUBSET_MIN(stat_field, subset_dataset)

In scripts:
subset_min(stat_field, subset_dataset)
Calculates the statistical function [Minimum value (lowest or first)] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_MODE
(Omniscope 2.5+)
SUBSET_MODE(stat_field, subset_dataset)

In scripts:
subset_mode(stat_field, subset_dataset)
Calculates the statistical function [Most common value (first if multimodal)] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_NONEMPTYCOUNT
(Omniscope 2.5+)
SUBSET_NONEMPTYCOUNT(stat_field, subset_dataset)

In scripts:
subset_nonEmptyCount(stat_field, subset_dataset)
Calculates the statistical function [Number of non-empty values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_RANGE
(Omniscope 2.5+)
SUBSET_RANGE(stat_field, subset_dataset)

In scripts:
subset_range(stat_field, subset_dataset)
Calculates the statistical function [Range of values (maximum minus minimum)] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_SINGLETON
(Omniscope 2.5+)
SUBSET_SINGLETON(stat_field, subset_dataset)

In scripts:
subset_singleton(stat_field, subset_dataset)
Calculates the statistical function [The single value, if there is one] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_STDDEV
(Omniscope 2.5+)
SUBSET_STDDEV(stat_field, subset_dataset)

In scripts:
subset_stdDev(stat_field, subset_dataset)
Calculates the statistical function [Standard deviation of values from the mean] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_SUM
(Omniscope 2.5+)
SUBSET_SUM(stat_field, subset_dataset)

In scripts:
subset_sum(stat_field, subset_dataset)
Calculates the statistical function [Sum (total) of values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_UNIQUECOUNT
(Omniscope 2.5+)
SUBSET_UNIQUECOUNT(stat_field, subset_dataset)

In scripts:
subset_uniqueCount(stat_field, subset_dataset)
Calculates the statistical function [Number of unique non-empty values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUBSET_UNIQUESLIST
(Omniscope 2.5+)
SUBSET_UNIQUESLIST(stat_field, subset_dataset)

In scripts:
subset_uniquesList(stat_field, subset_dataset)
Calculates the statistical function [A comma-separated list of all unique values] of a field.
Either:
(a) for all records (if only field_name is specified); or
(b) for a subset of data (if subset_dataset is specified).
Use the SUBSET function to define a data subset.
For more information, please visit SUBSET functions.
SUM SUM(number1, number2, ...) Adds all the arguments.
TAN TAN(number) Returns the tangent of an angle.
TANH TANH(number) Returns the hyperbolic tangent of a number.
TEXT_LINE_COUNT TEXT_LINE_COUNT(text) Returns the number of lines (split by line-break) in a text value.
TEXTTODATE TEXTTODATE(text_value, custom_format, lenient, time zone value)

In scripts:
textToDate(text_value, custom_format, lenient, time zone value)
Converts text into a date.

If custom_format is specified, this is a custom date format pattern such as "dd/MM/yyyy HH:mm:ss". If not specified, the default format for the current data locale will be used.

If lenient is omitted or is true, this controls whether non-existent dates are permitted, such as 29 February on a non-leap-year (corrected to 1 March).

If time zone value is specified, this controls how Omniscope interprets time values. If not specified, the text will be assumed to be a date/time from the same time zone as the system.

For more information on date and time formats please click here.
TEXTVALUE TEXTVALUE(value, pattern)

In scripts:
textValue(value, pattern)
Converts any value into the text equivalent, optionally using a format pattern.
The format pattern (which must be quoted text) defines how numbers or dates are formatted.
Usage examples:
TEXTVALUE(424) = "424"
TEXTVALUE(123456.789 , "$###,###.###") = "$123,456.789"
TEXTVALUE(DATEVALUE("02/06/2009") , "yyyy.MMMM.dd") = "2009.June.02"

For more information on date and time formats please click here.
For more information on number formats please click here.
TODAY
(Omniscope 2.5+)
TODAY Returns the current date.
TRIM TRIM(text) Removes all spaces from a text string except for single spaces between words.
TYPEOF
(Omniscope 2.6+)
TYPEOF(arg) Returns the type of the argument.
UNION
(Omniscope 2.6+)
UNION(subset1, subset2, ...)

In scripts:
union(subset1, subset2, ...)
Returns the data subset which is the union of records for all data subset arguments. If a record is present in ANY supplied subset, it will be present in the result.
WARNING: this is an experimental function that has not been optimised for performance. Use alternative solutions such as extra formulas and the SUBSET function if performance is unacceptable.
For more information, please visit SUBSET functions.
UPPER UPPER(text) Converts all letters in a text string to uppercase.
VALUE VALUE(text) Converts a text string that represents a number to a number, or date text into a date, where possible, otherwise resulting in a text value.
XPATH
(Omniscope 2.6+)
XPATH(xml_data, xpath_expression) Executes an XPath expression against an XML document. To obtain XML data, see the READRES function. For more information on XPath, see XPath guide

 Scripting format is shown for functions available in Content View scripts, from 2.7.