# Average Days from Days Opened formula

Options

I have a formula in a column for the number of a days a ticket has been opened.

=IF(Status@row <> "Completed", TODAY() - [Created Date]@row, "")

I want to add a metric in the sheet summary to tell me the average days of open tickets. I am using =ROUND(AVG([Days Opened]:[Days Opened], 1)), but this is accounting for closed tickets. How can I add a formula to only average the lines will values aka open tickets?

• ✭✭✭✭✭✭
Options

You would need to incorporate a COLLECT function.

=ROUND(AVG(COLLECT([Days Opened]:[Days Opened], [Days Opened]:[Days Opened], @cell <> "")), 1)

• ✭✭✭✭✭✭
Options

You would need to incorporate a COLLECT function.

=ROUND(AVG(COLLECT([Days Opened]:[Days Opened], [Days Opened]:[Days Opened], @cell <> "")), 1)

• Options

Thank you, that worked!

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

• Options

Is there a way to use this formula and filter just by the assigned user?

• ✭✭✭✭✭✭
Options

@Kpennington You would add another range/criteria set in the COLLECT function.

• Options

Am I thinking of this correctly?

=ROUND(AVG(COLLECT([Days Opened]:[Days Opened], [Days Opened]:[Days Opened], @cell <> ""),([Assigned To]:[Assigned To], [Assigned To]:[Assigned To], @cell, "Katie Pennington"))), 1)

• ✭✭✭✭✭✭
Options

@Kpennington It would go inside of the COLLECT function.

=ROUND(AVG(COLLECT([Days Opened]:[Days Opened], [Days Opened]:[Days Opened], @cell <> "", [Assigned To]:[Assigned To], @cell = "Katie Pennington")), 1)

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!