Basic Syntax
Simple Expressions
Attribute References
Reference attributes from your data objects using curly braces:Parent Navigation
Access parent data object attributes using../:
Attribute Expressions (Filtering)
Filter attribute values using property expressions:Comparison Operators
Logical Operators
Mathematical Functions
sum
Add multiple values together.sumabs
Sum of absolute values.average
Calculate the mean of values.max
Find the maximum value.min
Find the minimum value.count
Count the number of items.abs
Get absolute value (remove negative sign).ceil
Round up to nearest integer.floor
Round down to nearest integer.round
Round to nearest integer.decimalplaces
Round to a specific number of decimal places with optional rounding mode.Rounding modes:
round_up- Round away from zeroround_down- Round towards zeroround_ceil- Round towards positive infinityround_floor- Round towards negative infinityround_half_up- Round half values upround_half_down- Round half values downround_half_even- Banker’s rounding (round to nearest even)round_half_ceil- Round half values towards positive infinityround_half_floor- Round half values towards negative infinity
stddeviation
Calculate standard deviation of values.String Functions
concat
Combine multiple strings into one.uppercase
Convert text to uppercase.lowercase
Convert text to lowercase.trim
Remove leading and trailing whitespace.substring
Extract part of a string.length / strlen
Get the length of a string.len
Get the length of a string or count array items.contains
Check if a string contains a substring.startswith
Check if a string starts with a substring.endswith
Check if a string ends with a substring.replace
Replace text within a string.split
Split a string into an array by delimiter.regex
Test if a string matches a regular expression pattern.Date Functions
datemath
Add or subtract time from a date.daysbetween
Calculate days between two dates.weeksbetween
Calculate weeks between two dates.monthsbetween
Calculate months between two dates.isbeforedate
Check if first date is before second date (ignores time).isafterdate
Check if first date is after second date (ignores time).isdate
Check if a string is a valid date.validatedate
Validate a date string (similar to ISDATE).formatdate
Format a date string (specific format depends on implementation).Logical Functions
if
Conditional logic - returns second parameter if condition is true, third if false.isnull
Check if a value is null or empty.ifnull
Return first parameter if not null, otherwise return second parameter.isblank
Check if a value is blank/empty.Advanced Array Functions
sumifs
Sum values that meet specific criteria (conditional sum).countifs
Count values that meet specific criteria (conditional count).Special Functions
confidence
Calculate confidence level (statistical function).Complex Formula Examples
Multi-Condition Validation
Hierarchical Data Access
Conditional Formatting
Date Range Validation
Best Practices
1. Use Parentheses for Clarity
2. Reference Attributes Correctly
3. Handle Null Values
4. Use Appropriate Functions
5. Test Complex Formulas Incrementally
Build up complex formulas step by step:
{revenue}{revenue} - {costs}({revenue} - {costs}) / {revenue}decimalplaces(({revenue} - {costs}) / {revenue} * 100, 2)
Troubleshooting
Common Issues
Attribute Not Found
- Ensure attribute name matches taxonomy exactly
- Check attribute path for hierarchical references
- Verify attribute exists in current context
Type Mismatches
- Can’t perform math on strings:
"10" + 5won’t work - Convert types explicitly when needed
- Use appropriate functions for data types
Parent Navigation Errors
Parent data object not found- trying to go up too many levels- Check data object hierarchy depth
- Ensure parent relationships exist
Date Format Issues
- Use consistent date formats
- ISO format (YYYY-MM-DD) is most reliable
- Test with isdate() before date operations
Formula Evaluation Context
Formulas are evaluated with:
- Current taxon - The taxonomy node being evaluated
- Current data object - The data object containing attribute values
- All data objects - For hierarchical navigation and aggregations
- Taxonomy - For resolving attribute paths and types
