- style
YOU ARE CURRENTLY ACCESSING AN OUTDATED VERSION OF THE ZOOLA HELP DOCUMENTATION
Go to https://help.zoola.io for up-to-date documentation, videos, walkthroughs, and case studies.
Calculated Field Syntax
This section describes the syntax used when creating calculated fields in Ad Hoc views.
Use the following syntax for inputs:
Text String: to reference a text string, use single quotes: (')]— 'Text String'.
Field Label: to reference a field label, use double quotes: (") — "Ad Hoc Label".
Date Constants: to reference date constants, indicate the date type as part of the syntax, as listed below:
To reference a date without time data (for example: yyyy-dd-mm), use "d" followed by single quotes: (').
To reference a date with day and time data (for example: yyyy-dd-mm hh:mm:ss), use "ts" followed by single quotes: (') — "ts'2014-06-10 01:30:00'". If you use "ts" and enter the date information only, the time is automatically set to "00:00:00."
To reference a date with time data only (hh:mm:ss), use "t" followed by single quotes: (').
To reference a date field label, use double quotes: (") — "Ad Hoc Date Field Label".
BooleanExpression: any expression that takes on Boolean values, including the label of a Boolean field or measure, a Boolean calculation, or a Boolean value. You can create a BooleanExpression using the following: comparison operators: "(==, !=, >, >=, <, <=, in)." Functions that return Boolean values: "StartsWith," "EndsWith," "IsNull," "Contains," and logical functions: "AND," "OR," "NOT."
DateExpression: any type of date or timestamp values, including the label of a date field or measure, or a calculation that returns dates.
DateTimeExpression: date expressions that contain time values, including the label of a date field or measure, or a calculation that returns dates. These values are also known as timestamp values.
Expression: any valid date, date-time, numeric, or string expression.
NumericExpression: numeric values, including the label of a numeric field or measure, or a calculation that returns numbers.
TextExpression: text values, including the label of a text field or measure, or a text string.
Level: for aggregate functions, specifies the set of values used to compute the calculation. Possible values include: "Current" (not available for "PercentOf"), "ColumnGroup," "ColumnTotal," "RowGroup," "RowTotal," and "Total."
Related content
Copyright © Lambda Zoola™