Unknown Values in Spectre
Unknown indicates a value that cannot be computed. Here are some ways to get an unknown value in Spectre:
-
Uncomputable numeric operations.
For example, `1/0`, `log(-1)`, `arcsin(10)`.
-
Uncomputable date or period operations.
For example, `day(null)`.
-
Format or parse errors.
For example, `parse_integer("badnum")`, `date("2015 Jan", "M-D-YYYY")`.
-
Invalid arguments.
For example, `period("badcalendarname", "2015 Jan")`, `extract(date("2015/01/01"), "badinterval")`.
With very few exceptions, every expression that encounters unknown returns unknown. It is never treated as a normal value because it is impossible to determine which normal value applies.
You can check for unknown with the is_unknown() function and use the catch() function to substitute alternative values for unknown.
Displaying and Diving on Null and Unknown
- In summary columns, that is the non-dimension columns, null and unknown both display as blank values.
- In dimension columns, null is the blank value and unknown displays as <unknown>.
See also: