This article is for Structure Cloud.
Problem
The formula in my structure is not working - it’s either displaying an error or not showing the expected values.
Solution
-
If a formula is returning an error, you can check our errors guide to find out what the reason behind the error is in your case: https://help.tempo.io/structure/latest/expr-error-codes The guide also provides suggestions on how each error can be addressed.
-
If a formula is not working completely, and a part of the configured formulas is highlighted in red, then it’s likely that some element or elements are missing in the expression. E.g., closing brackets, closing quotes, etc. Adding the missing symbols should help.
-
If the formula itself is written correctly, but some of its used variables are shown in red, then these variables should be properly mapped to the right attributes: https://help.tempo.io/structure/latest/mapping-variables A formula can only work properly when all referenced variables are correctly mapped and recognized.
-
If the formula is written correctly, and nothing in it is highlighted in red, then the following checks can help to identify the root cause:
1. Click on every referenced variable and make sure that it’s mapped to the right attribute on the list. A reference can be broken - the selected field/column is missing, or a wrong one is selected. Also, check if there are two fields/columns of the same name, and if so, select the other duplicated attribute on the list, and see if it helps.
2. Check that all referenced variables have individual values. Sometimes a formula can produce no output because there are no values to consider.
3. Make sure that the right functions and names of properties are used. You can find the list of all existing functions and names of accessible properties of items in the documentation: https://help.tempo.io/structure/latest/functions https://help.tempo.io/structure/latest/item-properties
4. If a formula uses values of child items for calculation, and the output is missing from the parent items, make sure that some form of aggregation is added to the formula. This can be done either by using aggregate functions in the formula or by enabling the ‘Sum over sub-items’ option in the column’s configuration. Depending on the setup, either method can apply.
5. Troubleshoot the formula: split it into parts, and check that each part produces correct values. You can add multiple Formula columns, and fill each with a different part of the main formula. This can show whether a particular step of the calculation is not working or is not working as expected.
If the formula still doesn’t work after exploring the suggestions above, please let us know, and we will look into it. Please share the formula you’re using in full, as well as screenshots of your structure so we can see your setup, the hierarchy of work items in the structure, and where all the relevant values come from. It’s often impossible to provide any recommendations without understanding the context around the formula, so please make sure to provide as many details as possible.