In this article, I will explain How to
Calculate the Tasks count in Project Schedule in Project Server
As shown above, the count of total tasks below the main Summary task is 6
- Create an Enterprise Custom Fields.
- Build the formula for the custom field.
- Roll up the Calculation for Summary Rows.
- Add the custom field to the appropriate Task View.
- Edit your Project Schedule to calculate the formula.
Create an Enterprise Custom Fields
- Open your PWA Site > PWA Settings.
- Below the Enterprise Data > Click on Enterprise Custom Fields and Lookup Tables.
- Click on New FIeld Button.
- Set the appropriate name for your field “Tasks Count”.
- At Entity, Select Tasks.
- At Type, Select Number.
Build the formula for the custom field
- At Custom Attributes, choose formula.
- In the formula text area, write the below formula
IIf([Summary], ([Task Count] - 1), 1)
In this formula,
- we checked if the current task is a summary task, calculates the task count, else show 1.
- The [Task Count] is a built-in field that used to gets the total number of tasks.
- The result of [Task Count] is always the number of tasks +1, so we use ([Task Count] – 1).
Roll up the Calculation for Summary Rows
In this step, I will choose how this field gets rolled up for summary rows including grouping summaries by doing the following:
- At Calculation for Summary Rows, choose Roll Up.
- Select Count All to calculate the total number of tasks below each summary task.
- Save your custom field.
Add the custom field to the appropriate Task View
As we explained, this custom field is a task custom field that should be added to Task view like Task Summary view as the following.
- Open PWA Settings, below Look and Feel > Select Manage Views.
- Below Project Category > Click on Task Summary.
- Below Fields, Select the newly created field, then click on add button to add it to the shown fields in this view.
- You can move the field Up and down as you prefer.
Edit your Project Schedule to calculate the formula
If you opened your project schedule, you will note that the formula is not calculated yet as shown below:
To make the formula reflected and calculated properly, you must
- Edit your Project Schedule.
- Perform a specific edit as you need.
- Click on Save, wait a moment until the Save operation completed successfully.
- Click on Publish, wait a moment until the Publish operation completed successfully.
- Then Click Close, to Check-in the Project.
- Project Server 2016.
- Project Server 2013.
- Project Server 2010.
- Project Online
In case, you need to get the total number of project in project center, check PROJECT CENTER TOTALIZE.