Assistance Needed with PMO Formula.
Looking for some help, with the following criteria that I haven't been able to find in the community.
Task health formula:
[ Green ] If task Not Started, In Progress, Completed, Cancelled and End-Date is today+future.
[ Red ] If task End-Date is in the past and task is Not-Started or In-Progress.
Grand-Parent row:
[ Red ] if 3 or more (children only) tasks are Red otherwise [ Green ]. Please note there are 4 parents (Planning, Execution, Monitoring and Closing).
Thanks in advance,
Best Answer
-
Hi @Saj
please try the following:
1: Create Helper Columns
- Task Status (Dropdown): This column should have values like "Not Started," "In Progress," "Completed," and "Cancelled."
- End Date (Date): This column will hold the end date of each task.
- Task Health (Text/Number): This column will display the health status of each task (Green or Red).
- Child Task Count (Text/Number): This column will be used to count the number of red child tasks for each grand-parent row.
2: Set Up Task Health Formula
In the Task Health column, use the following formula to determine the task health based on the criteria:
For Green Tasks:
=IF(OR([End Date]@row >= TODAY(), [Status]@row = "Completed", [Status]@row = "Cancelled"), "Green", "")
For Red Tasks:
=IF(AND([End Date]@row < TODAY(), OR([Status]@row = "Not Started", [Status]@row = "In Progress")), "Red", [Task Health]@row)
Combine both conditions:
=IF(OR([End Date]@row >= TODAY(), [Status]@row = "Completed", [Status]@row = "Cancelled"), "Green", IF(AND([End Date]@row < TODAY(), OR([Status]@row = "Not Started", [Status]@row = "In Progress")), "Red", ""))
To calculate the number of red child tasks for each grand-parent row, use the Child Task Count column.
Create a Parent Indicator (Checkbox): This column indicates if a row is a grand-parent row (Planning, Execution, Monitoring, Closing).
Create a Parent Task Column (Text/Number): This column contains the grand-parent row name for each child task.
Formula to Count Red Child Tasks:
In the Child Task Count column for the grand-parent rows, use the following formula:=COUNTIF(CHILDREN([Task Health]@row), "Red")
Red if 3 or More Red Child Tasks:
Apply conditional formatting to the Grand-Parent Row using the condition:=IF([Child Task Count]@row >= 3, "Red", "Green")
Green if Less than 3 Red Child Tasks:
The else condition can be set as green.Example
Task Name
Status
End Date
Task Health
Child Task Count
Parent Indicator
Parent Task
Planning
☑
Task 1
In Progress
2024-05-10
Planning
Task 2
Not Started
2024-05-12
Planning
Task 3
Completed
2024-05-15
Planning
Execution
☑
Task 4
Not Started
2024-05-08
Execution
Task 5
In Progress
2024-05-09
Execution
Monitoring
☑
Task 6
In Progress
2024-05-11
Monitoring
Closing
☑
Task 7
Completed
2024-05-13
Closing
- Ensure all column references in formulas match the actual column names in your Smartsheet.
- After setting up the formulas, apply the necessary conditional formatting rules to the Task Health and Child Task Count columns to visually represent the health statuses.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Answers
-
Hi @Saj
please try the following:
1: Create Helper Columns
- Task Status (Dropdown): This column should have values like "Not Started," "In Progress," "Completed," and "Cancelled."
- End Date (Date): This column will hold the end date of each task.
- Task Health (Text/Number): This column will display the health status of each task (Green or Red).
- Child Task Count (Text/Number): This column will be used to count the number of red child tasks for each grand-parent row.
2: Set Up Task Health Formula
In the Task Health column, use the following formula to determine the task health based on the criteria:
For Green Tasks:
=IF(OR([End Date]@row >= TODAY(), [Status]@row = "Completed", [Status]@row = "Cancelled"), "Green", "")
For Red Tasks:
=IF(AND([End Date]@row < TODAY(), OR([Status]@row = "Not Started", [Status]@row = "In Progress")), "Red", [Task Health]@row)
Combine both conditions:
=IF(OR([End Date]@row >= TODAY(), [Status]@row = "Completed", [Status]@row = "Cancelled"), "Green", IF(AND([End Date]@row < TODAY(), OR([Status]@row = "Not Started", [Status]@row = "In Progress")), "Red", ""))
To calculate the number of red child tasks for each grand-parent row, use the Child Task Count column.
Create a Parent Indicator (Checkbox): This column indicates if a row is a grand-parent row (Planning, Execution, Monitoring, Closing).
Create a Parent Task Column (Text/Number): This column contains the grand-parent row name for each child task.
Formula to Count Red Child Tasks:
In the Child Task Count column for the grand-parent rows, use the following formula:=COUNTIF(CHILDREN([Task Health]@row), "Red")
Red if 3 or More Red Child Tasks:
Apply conditional formatting to the Grand-Parent Row using the condition:=IF([Child Task Count]@row >= 3, "Red", "Green")
Green if Less than 3 Red Child Tasks:
The else condition can be set as green.Example
Task Name
Status
End Date
Task Health
Child Task Count
Parent Indicator
Parent Task
Planning
☑
Task 1
In Progress
2024-05-10
Planning
Task 2
Not Started
2024-05-12
Planning
Task 3
Completed
2024-05-15
Planning
Execution
☑
Task 4
Not Started
2024-05-08
Execution
Task 5
In Progress
2024-05-09
Execution
Monitoring
☑
Task 6
In Progress
2024-05-11
Monitoring
Closing
☑
Task 7
Completed
2024-05-13
Closing
- Ensure all column references in formulas match the actual column names in your Smartsheet.
- After setting up the formulas, apply the necessary conditional formatting rules to the Task Health and Child Task Count columns to visually represent the health statuses.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
@Bassam Khalil , Thank you for the detailed reply and formulas. All of those are working just had to change column names.😊
-
You Are welcome @Saj
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!