Knowledge Base

How to calculate total count of items which are listed on another list item?

In a BoostSolutions’ Collection Column, you can list multiple items on another list item and calculate data using formulas and functions.

In this article, we will add/list subtasks for project item and calculate the total count of the subtasks.

Now, let’s get started.

WHAT YOU'LL GET

The Count field shows the total count the subtasks

WHAT YOU'LL NEED

The sample data we use for this case

And there is another list named as Tasks of ARB Project, the list includes these columns as following.

Calculate total count of items which are listed on another list item

  1. Download the trial version of Collection Column and install it to your SharePoint server.

  2. Navigate to the ARB Project list, click List tab. In the Manage Views group, click Create Column.

  3. In the Name and Type section, enter a name in the Column Name field to give it a meaningful name such as Subtasks, then select Collection Column as the type of information in this column.

  4. In the Additional Column Settings section, keep all settings as default.

  5. In the Source List section, select Tasks of ARB Project from the drop-down list.

    Select Task Name, Priority, Task Status, % Complete, Assigned To, Start Date and Due Date column as Editable as following.

  6. In the Calculated column section, specify a name for this expression name, such as Total Days, then type this formula in the formula box as following.

    DiffDays([Due Date],[Start Date])

    This formula will calculate the number of days based on the Due Date and Start Date.

  7. In the Total Settings section, select Count for Task Name and select Sum for Total Days.

  8. Keep other settings as default and click OK to create column.

  9. Navigate to ARB Project list and you will find that a column named as Subtasks is created in the list as following.

  10. Select item ARB Module 1 and edit it.

    In the Subtasks column, you will find a column named Total Days which is defined in step 6.

    Fill-in Task Name, Priority, Task Status, % Complete, Assigned, Start Date and Due Date column as following, then the Total Days will show the calculated results.

    At the bottom of Subtasks column, you can see a “Count” field with the total count of subtasks; and a “Sum” field with the total days of two subtasks.

  11. And then click Save button to save the changes.

  12. You will find that there are two items in ARB Module 1 item as following.

  13. Click on 2 Items link, you can see the detail of this item.

Login