Hello,
i have calculated the difference ( say LeadTime) in when an issue was approved and when it was marked done. the total of diff is calculated at the parent level
second, i have counted (say noOfIssues) the number of issues which aware approved and marked done in a month. the total count is calculated at parent level
Now, i just want to divide LeadTime/noOfIssues and it is giving me div/0
i have already made sure to check that noOfIssues > 0, i have made sure that all of these variables are numbers
I have also separately calculated each of the number and it works fine. also LeadTime - noOFIssues works fine, LeadTime + noOfIssues works fine it is just the division that is not working as expected.
Any help is much appreciated.
Problem - If you remove the option “sum over subitems“ from the Lead Time formula, there will be no value on the folder level. For the formula, we would need to use the actual function to bring the value to that level.
Solution as suggested by the support team and worked:
So, instead of -
IF noOfIssues: LeadTime / noOfIssues
USE
WITH leadTime = SUM#subtree{ if resolved >0: if resolved >0: ((resolved - caraprtval)/86400000)/1 }: leadTime/count123
Hello @Umesh Kulkarni
With cropped screenshots it's hard to say anything for certain, but one of the possible reasons for the Formula to consider 0 is the noOfissues value you want to use is aggregated. I.e. if 12 is not an individual value, but a value summed up from sub-issues using the 'Sum over sub-items' option in the column that is being referenced in the end Formula column. If this is the case, then try using sum{noOfissues} in the end formula instead of noOfissues
I hope this helps. If you need further assistance with the formula or if you have other questions about Structure, please reach out to us directly at our support portal.
Best regards,
Stepan
Tempo (the Structure app vendor)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Umesh Kulkarni -- Welcome to the Atlassian Community!
First thing, I am not currently using Structure and so my suggestions are based on what I recall. With that out of the way...
Have you tried adding a conditional to confirm the formula is detecting a non-empty value? Perhaps like this:
IF noOfIssues: LeadTime / noOfIssues
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bill,
Thanks for the suggestion
I have given it a try, now it shows 0 with your suggestion while it should have shown 17 (with no decimals)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For that expression, I believe that is the behavior when it detects noOfIssues is either 0 or empty, the same as this:
noOfIssues AND LeadTime / noOfIssues
If you replace the formula with just noOfIssues does it return what you expected or 0? That may narrow down if it is finding another value, or if the value is not yet set when the division is attempted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bill,
Thanks for checking further.
Yes, if i just put noOfIssues then it does return non zero value (here in this case 12)
Not getting, why it considers 0 when used in a formula -
IF noOfIssues: LeadTime / noOfIssues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.