Formula to count Done subitems not working

​​​​​​​​​​​​Anyone know why this formula is not working for me?

COUNT({Subitems#Status} = “Done”)

I am trying to count how may of my subitems are Done (Status column) on my main item.
It acts like it has accepted my formula okay but it is ays “0” when in fact i have 1 subitem in Done Status

Hi @BrandiLKT - this will not work as this is returning an array of values. A way to get around this would be to add a Number column to your subitems, let’s call it “Done Counter”.

Then add two automations:

  • When subitem Status changes to Done, then set Done Counter = 1
  • When subitem Status changes to anything AND subitem Status is not Done then set Done Counter = 0

Then you can show the Done Counter summary to the parent item to always know how many are done within each:

image

Hope this helps!
Mark

Hi Brandi,

The other option is to use a 3rd-party app called Advanced Formula Booster.

This app has numerous advantages, the first of which is that it doesn’t use the formula column but rather allows you to write the result of a formula to any type of column. In this case, you would create a {DoneCount} numbers column and write this formula.

On line 1 (you can use up to 100 lines in your formulas), I assign the values of the statuses of your subitems to a temporary variable called [SubsStatuses] (temporary variables are in-between square brackets). You can see the results of each line in the Test pane of the right.
On line 2, I apply a filter to only keep the ones that are “Done”.
On line 3, I split the result against the vertical line (or pipe. That’s the llist separator used by the Advanced Formula Booster) and get the count, in this case 2.

As simple as that! In the Advanced Formula Booster, you not only can write formulas involving the item itself, but its subitems (as you can see here), the previous item, the next item and the parent item if any.

Hope it helps.