I am trying to use the SUM and CHILDREN Function to subtract the actual cost vs the quoted amount

CJ1234
CJ1234
edited 02/15/24 in Formulas and Functions

I am trying to use the SUM and CHILDREN Function to subtract the actual cost vs the quoted amount to determine the profit.


I have at the top of the page

Month

Week

Request

That is the hierarchy and I need to create a formula that will tell me the profit not only for each request but for the month as well.


Please help...

Best Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    Try this:

    =IF(COUNT(CHILDREN()) = 0, [Quoted Amount]@row - [Actual Cost]@row, SUM(CHILDREN()))

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    It is a 3 part formula.


    First there is a part for child rows.

    [Quoted Amount]@row - [Actual Cost]@row


    Then there is a part for parent rows.

    SUM(CHILDREN())


    Then there is a part that says if it is a child row (it has no child rows of its own), then do the child row part, otherwise do the parent row part.

    IF(COUNT(CHILDREN()) = 0, .........., ..........)

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!