Rolling up Health to the Parent row

Lauren T
Lauren T ✭✭
edited 02/13/20 in Smartsheet Basics

Is there a way to roll up health of tasks underneath the parent to reflect an "average" health, if you will?


I have a formula for my children to render health, however, I can't seem to roll up to the parent. Would the same formula work the same in the parent row, if my formula is based on start/finish date and % complete?


My health formula is: =IF(OR([% Complete]@row = 1, [Start Date]@row > TODAY()), "Green", IF(Status@row = "Not Started", "Gray", IF([Finish Date]@row < TODAY(), "Red", IF([Finish Date]@row = TODAY(), IF([% Complete]@row < 0.5, "Red", IF([% Complete]@row < 0.75, "Yellow", "Green")), IF([Finish Date]@row = TODAY(3), IF([% Complete]@row < 0.25, "Red", IF([% Complete]@row < 0.5, "Yellow", "Green")))))))

Best Answers

«1

Answers

  • I am trying to a formula to measure health at the task level. I figured it out, and it worked perfectly, but realized I wanted to add in the IF statement that IF Status = Not Started, Health would be Gray. However, with the addition to the formula below, it is returning "Incorrect Arguement Set". Any ideas on what part of the formula is incorrect? Thank you for any help!


    =IF(OR([% Complete]@row = 1, [Start Date]@row > TODAY()), "Green", IF(Status@row = "Not Started", "Gray"), IF([Finish Date]@row = TODAY(), IF([% Complete]@row < 0.5, "Red", IF([% Complete]@row < 0.75, "Yellow", "Green")), IF([Finish Date]@row = TODAY(7), IF([% Complete]@row < 0.25, "Red", IF([% Complete]@row < 0.5, "Yellow", "Green")))))

  • @Genevieve P


    Thank you SOOOOO much! And thank you for breaking it down, it makes so much sense to me now that you've broken it down line by line.

    Seeing it broken out and what each section means, it looks like I'm not getting exactly what I need. I need the following criteria met, I'm just not sure how to write the formula correctly:

    • If Status = Not Started AND Start Date is in the future, Grey
    • If % Complete is equal to or greater than 75% AND "Due Date" is in 1 week, then Green
    • If % Complete is equal to or less than 50% AND "Due Date" is in 1 week, then Yellow
    • If % Complete is equal to or less than 25% AND "Due Date" is in 1 week, then Red
    • If none of the criteria above are met, then Green

    I'm basically wanting to set the health of my project based on the due date compared to the % complete, is this is right logic? Thanks so much for your help.


    Lauren

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi Lauren,

    Since Logic formulas read left-to-right, I've reorganized the order (otherwise the rule for Yellow to look at "less than 50" would include the red ones as well. This is why I've put the Red criteria first).

    Try this:

    =IF(AND([Start Date]@row > TODAY(), Status@row = "Not Started"), "Gray", IF(AND([% Complete]@row <= 0.25, [Due Date]@row >= TODAY(), [Due Date]@row <= TODAY(7)), "Red", IF(AND([% Complete]@row <= 0.5, [Due Date]@row >= TODAY(), [Due Date]@row <= TODAY(7)), "Yellow", IF(AND([% Complete]@row >= 0.75, [Due Date]@row >= TODAY(), [Due Date]@row <= TODAY(7)), "Green", "Green"))))


    Keep in mind that you have no statement for anything between 50 - 75%... so since your default is Green, anything between that with a due date this week will be Green.


    Here is each statement in comparison to (& in the order of) your points above:


    • If Status = Not Started AND Start Date is in the future, Grey

    =IF(AND([Start Date]@row > TODAY(), Status@row = "Not Started"), "Gray",


    • If % Complete is equal to or greater than 75% AND "Due Date" is in 1 week, then Green

    IF(AND([% Complete]@row >= 0.75, [Due Date]@row >= TODAY(), [Due Date]@row <= TODAY(7)), "Green",


    • If % Complete is equal to or less than 50% AND "Due Date" is in 1 week, then Yellow

    IF(AND([% Complete]@row <= 0.5, [Due Date]@row >= TODAY(), [Due Date]@row <= TODAY(7)), "Yellow",


    • If % Complete is equal to or less than 25% AND "Due Date" is in 1 week, then Red

    IF(AND([% Complete]@row <= 0.25, [Due Date]@row >= TODAY(), [Due Date]@row <= TODAY(7)), "Red",


    • If none of the criteria above are met, then Green

    "Green"))))


    Let me know if this works!

    Cheers,

    Genevieve

  • @Genevieve P

    It works great! The only thing is that is the due date has passed, it doesn't matter the % complete - it remains Green. Is that because of the last bullet point, where if the criteria is not met above, then Green? Would it change if I take it out? Would a "If (due date)@row is passed, "Red" work?

    Also, I am trying this on a project where the only % complete numbers will be 100% or 0% - how do I add that logic in? Or will I need to come up with a whole other formula?

    Thank you again for your continued help, this is saving me as I'm terrible at formulas!

  • Hi, I posted this in the other thread as well.

    @Genevieve P

    Can you please tell me what column names I need for this to work?

    Do I need anything else for this formula to work?

    Also, do I paste this formula in the health column?


    Thank you!

    Candace

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Candace Hebert

    It may be better to write your own formula with specific rules based on the criteria you want to see... but here are the column names that are used in this formula:

    There's a Start Date column

    and a Due Date column

    and a % Complete column.


    This would be pasted into the Health column, or whichever column is returning the RGY balls. This formula accounts for a Gray ball as well.

    Let me know if it works for you, or if you want to adjust any of the criteria that Lauren had specified and I'm happy to help! It may also be useful to see a screen capture of your sheet (but please block out any sensitive data).

    Cheers,

    Genevieve

  • Thanks, @Genevieve P!


    I've attached a screenshot of my sheet. I've used the formula you provided but it says UNPARSABLE.


    Can you please help?


  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Candace Hebert

    No problem, happy to help! It looks like you've pasted the formula into the % Complete column. Since we're referencing that column in the formula, we want to actually paste this into a new column... one that is a Symbol type of column (see here) that has the different coloured balls as the output. You could call this column "Health" or "Status". Does that make sense?

  • Molly Lindblom
    edited 03/12/21

    Hi @Genevieve P , Your explanation above was a big help. I used the exact formula you provided

    • The formula works well for most Level 3 (individual task) items although toward the end of my project sheet the anything not started is inexplicably showing as green. This despite showing Not Started and 0% complete.
    • I have some Level 2 items (tasks rolled up into larger categories like Sales Enablement or Website updates) and Level 1 items (Stage 1, Stage 2, etc.). The Level 1 and 2 items where all level 3 items are 100% are green as expected. The Stage 1 and Stage 2 categories with in-progress or not started Level 3 categories show yellow even though the due date for Level 1 and 2 items are more than seven days away. Any idea why that would happen?

    Thanks in advance for your help.

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Molly Lindblom

    This formula evaluates each row individually, without looking to see if it's a Parent or Grandparent task. It will be dependent on that row's data.

    Keep in mind if you're using Project Settings on your sheet, the data in your Level 1 and Level 2 header rows will be rolled up from the child rows using the Parent Rollup Functionality.

    This means that the Start Date of these rollup rows will show the earliest Start Date of all its children, and the latest End Date of its children. Therefore, if one of the Child tasks starts either Today or earlier, but one of the other children rows has an End Date in the future, then this row would show Green. Could this be what's happening for your first point?

    =IF(OR([% Complete]@row = 1, [Start Date]@row > TODAY()), "Green",

    If either the % Complete is 100 OR if the Start Date is in the future, return Green.


    For your second point, it's hard to identify what might be happening without seeing your sheet set up, hierarchy, and formula. Would you be able to post a screen capture, showing the formula? (Double click on the cell). Please block out any sensitive data from the image!

    Cheers,

    Genevieve

  • Irene D
    Irene D ✭✭
    edited 05/11/21

    Hi @Genevieve P,

    I've re-capped the formula you previously created for Lauren (see below). Please note that I switched out "Due Date" with "End Date" to align with the table headings in my sheet.


    If Status = Not Started AND Start Date is in the future, Grey

    ·        =IF(AND([Start Date]@row > TODAY(), Status@row = "Not Started"), "Gray",

    If % Complete is equal to or less than 25% AND "End Date" is in 1 week, then Red AND if “End Date” is passed, then red

    ·        IF(OR(AND([% Complete]@row <= 0.25, [End Date]@row >= TODAY(), [End Date]@row <= TODAY(7)), AND([% Complete]@row <> 1, [End Date]@row < TODAY())), "Red",

    If % Complete is less than 50% AND "End Date" is in 1 week, then Yellow

    ·        IF(AND([% Complete]@row < 0.5, [End Date]@row >= TODAY(), [End Date]@row <= TODAY(7)), "Yellow",

    If % Complete is equal to or greater than 75% AND "End Date" is in 1 week, then Green

    ·        IF(AND([% Complete]@row >= 0.75, [End Date]@row >= TODAY(), [End Date]@row <= TODAY(7)), "Green",

    If none of the criteria above are met, then Green

    ·        "Green"))))


    However, since my sheet also contains a "Status" (not started, in progress or complete) column in addition to the "% Complete", I would like some help to make modifications to the formula. Is there a way to reflect that if a start date is in the past and the status is "Not Started", then red? Similarly, if the status is "In Progress" or "Not Started" and the end date is in the past, then red?

    Thank you in advance!

    Irene

  • Genevieve P.
    Genevieve P. Employee Admin

    Hi @Irene D

    No problem! We can include those two status options as an OR statement within the RED section of the formula:


    If % Complete is equal to or less than 25% AND "End Date" is in 1 week, then Red

    OR if “End Date” is passed and % complete is not 100%, then Red

    OR if "End Date" is passed and Status is either "in Progress" or "Not Started", then Red


    IF(OR(AND([% Complete]@row <= 0.25, [End Date]@row >= TODAY(), [End Date]@row <= TODAY(7)), AND([% Complete]@row <> 1, [End Date]@row < TODAY()), AND(OR(Status@row = "In Progress", Status@row = "Not Started"), [End Date]@row <= TODAY())), "Red",



    Does that work for you? Do you have other Status criteria you want to build in to the other colours?

    Cheers!

    Genevieve

  • Irene D
    Irene D ✭✭

    Hi @Genevieve P ,

    I was hoping to also create a completely different Status criteria for a different sheet that I have.

    1) If Status = Not Started AND Start Date is in the future, Grey

    2) OR if "Start Date" past up to 5 business days AND Status is "Not Started”, then Yellow

    3) OR if “End Date” is in past AND % complete is not 100%, then Red

    OR if "End Date" is in past AND Status is either "in Progress" or "Not Started", then Red

    OR if "Start Date" is in past AND Status is "Not Started", then Red

    4) OR if % Complete is equal to 100% OR Status is “Complete”, then Green

    OR if "Start Date" is in past and Status is "In Progress", then Green

    Is there any chance you could kindly help me build something based on this criteria?

    Thanks!

    Irene