Expressions: Overview
The FastStats Expression tool provides multiple functions that allow you to manipulate your data for analysis and/or output purposes.
You can use expressions in four places in FastStats:
-
Calculate Expression wizard to populate a new variable according to a mathematical expression or logical rule
-
Cube as a cube statistic or dimension
-
Data Grid as an output column
-
Like a variable in a selection
FastStats supports the following in expressions:
-
Aggregation Functions - Functions that allow the aggregation of multiple values, such as finding the minimum of a list.
-
Date Conversion Functions - Functions to support the conversion of dates
-
Date Functions - Functions allowing the manipulation of date fields.
-
Date List Functions - Functions used to compare a list of dates
-
FastStats Variables - Using FastStats variables in expressions
-
File Functions - Functions used to look up a value or read a column from the file in the path parameter
-
Inequality Operators - Operators to support comparisons such as 'greater than'.
-
Location Functions - Geo functions that allow the use of latitude and longitude to calculate distance as well as selecting parts of UK postcodes.
-
Logical Functions - Functions for building conditional expressions.
-
Maths Functions - Functions allowing square roots and logs.
-
Missing Values - Missing value support.
-
Operators - Simple operations such as addition and subtraction.
-
Queries - Using queries in expressions
-
Selector Functions - Functions used to manipulate the codes, descriptions, values or indices of selector functions
-
String Functions - Functions to support text processing
FastStats also offers the ability to create Aggregated Expressions 'on the fly' and Derived Cube Expressions.
Added in Q1 25 - Ability to copy one expression into another
We've introduced the ability for you to drag one expression into another using its drag handle. This copies all of the expression text to the insertion position of the new expression, and will also include any embedded queries, aggregations and cube lookups. Validation occurs to ensure you aren’t adding too many queries/cubes for the expression.
This development supports the creation of complex expressions and allows you to test part of an expression before then adding it into another you are already working on.
More information and worked examples can also be found in the FS User Guide - Expressions - available in the Training resources area of the Apteco website portal.