Hi, I have a formula that calculates the % of Tasks completed in a Phase. I have Tasks set up as Rows in a Table. I just started creating subitems for the Tasks but I don’t want those to be included in the formula. How can I exclude subitems in my formula? This is my formula: [II/IM Project Tasks].Filter(Phases.Contains(thisRow)).Status.CountIf(CurrentValue.Contains(Done))/[II/IM Project Tasks].Filter(Phases.Contains(thisRow)).Status.Countall()
If I understood correctly the situation, you have subitems enabled in your table. If that is the case, Coda will automatically add 2 columns to your table, although they are hidden by default: “Parent” and “Subitems”.
You can exclude the subitems from being counted by filtering tasks that do not have any parents: if it has no parent, that means the task is a top-level task.
So I think if you add CurrentValue.Parent.isBlank() to the condition inside the filter, it should perform what you need.
[II/IM Project Tasks].Filter(Phases.Contains(thisRow)).Status.CountIf(CurrentValue.Contains(Done) AND CurrentValue.Parent.isBlank())/[II/IM Project Tasks].Filter(Phases.Contains(thisRow)).Status.Countall()