HomeFormulas

Troubleshooting

If you are getting an error with a variable, you can hover over the formula Error or the variable ! and Causal will try to explain the cause of the error.

Common errors

Error messageWhat does it meanHow do I fix it?
A function has an incorrect number of arguments.You used too many or too few parameters to call a function.Check the function documentation and use the correct number of arguments in your formula.
Aggregation set to None.You use an aggregated variable in your formula, but the variable's category aggregation is set to None (see none values for more).Change the variable's category aggregation or don't aggregate the variable in your formula.
Category error.There is some inconsistency in the variable's categories
Data error.The data dimensionality doesn’t match the variable dimensionality. This can happen if you explicitly apply a category and connect the variable to a data item that isn’t broken down by that categoryMake sure the data item and the variable have the same category. Either add the category to your data source, or remove the category from the variable.
Date functions are undefined for time-aggregations.Currently, calling date to map monthly, quarterly, annual, or exhaustive timespans to an exact date is undefined behaviour
Expected a variable.You didn't provide a variable when you called a function that only works with variables, e.g. is_dataUse a variable as the argument when calling the function.
Invalid number errorYour formula results in an invalid number (e.g. division by zero, sqrt(-2))Correct the formula, or use the if_error function to return an alternative value (e.g. ”Z”) instead of an error.
Invalid syntax in formula.You did not use the correct syntax in your formula, e.g. you forgot the "else" in an if-statementCheck the function documentation in the help menu or on the functions page here
Mappings to a category are ambiguous.There is more than one path from one category to another category. E.g. Category A → Category B → Category C and Category A → Category D → Category CRemove one of the category mappings in the data table.
The linked variable does not exist.This can happen if you import a variable from a linked model, and then delete the original variable in the linked model.Create and import the variable again.
There is a cyclical dependency in this formula.Your variables cyclically depend on each other, e.g. A depends on B and B depends on A.Change the referenced time steps of the variables. E.g. if A depends on B, then B can depend on the previous value of A
Unknown expression.You tried to use a function that doesn't exist in Causal.Check out the functions tab in the help menu to see the list of supported functions.
Unknown variable.Your formula uses a variable that doesn't exist in the model.Import the missing variable from a different model or use a different variable in your formula.
You need to aggregate a span using min(), avg(), ...A span is an array of values, e.g. Variable[all] or Variable[0:t]. The result of your formula has to be a single number and cannot be a span.Aggregate the span into a single number using an aggregation function like sum(Variable[all]) or min(Variable[0:t]).