Data Value Types
All columns and data in Sigma have a data value type that governs how the data is displayed and what operations users can perform with that data.
Summary of Content
Database Value Types
Functions and Value Types
Type Conversions
Sigma's Value Types
Value types include text, date, number, logical (true/false), variant, and null.
Date
Dates represent either a specific calendar date or a specific date and time.
Sigma does not recognize distinct time or duration types, but you can use functions like DateAdd or DateDiff to work with quantities of time in a specific unit.
Variant
Variants represent columns with JSON data. Sigma allows you to extract columns of data from variants by selecting Extract Columns in the variant column menu.
Null
Nulls represent the absence of values. A null value, displayed as "null" or an empty cell, can occur for various reasons:
- Null values exist in the data source
- A formula cannot compute a value (e.g., = 100 / 0)
- A corresponding row cannot be found in a joined table
In many cases, passing a null value to a function that's not expecting it will return a null result.
3 = 3 // True
3 = 1 // False
3 = Null // Null
Null = Null // Null
This behavior allows Sigma processes to continue despite what would otherwise result in an error. Because the source of the error may be obscured, when a null value is expected, functions like IsNull and Coalesce can be helpful.
As with any value, you can filter null data at the column level.
Database Value Types
A data warehouse has its own library of system-supported value types that may be complex and intended for optimal data storage. When Sigma queries a connected data warehouse, it consolidates the data into Sigma's simplified value types.
If a database table contains values that don't correspond with Sigma value types, the values are treated as text.
Functions and Value Types
Each function and operator requires specific value types as its arguments. If the arguments don't match the acceptable value types, the formula bar displays a warning and the corresponding column returns an error.
Sigma's function documentation outlines value type requirements for the given function's arguments. See function index.
Type Conversions
When Sigma doesn't automatically identify the correct value type, or a formula requires that you specify it, use the appropriate type-conversion function to ensure Sigma recognizes and evaluates the data as the correct value type. Learn how.