Calculate % complete with Date Range and Today's date

Hello community,

I need a formula to return % Complete based on a start - end date range and today's date.

So for example:

Date Range: 06/18/23 - 06/30/23

Today's date: 06/26/23

As there are 12days in this date range, and today's date is day 8 out of 12, the percentage complete would be 66.6%

Thanks in advance!

Tags:

Best Answer

Answers

  • Follow up - this is my solution but maybe there is a single formula option?

    Currently I have two helper columns

    Days:=IFERROR(NETDAYS([email protected],[email protected]), "")

    Today - Start:=IF([email protected]> TODAY(), TODAY() -[email protected])

    % Complete:=IFERROR([Today - Start]@row /[email protected], "")

    Screenshot 2023-06-26 at 12.54.11.png


  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Try this:

    =MAX(MIN((TODAY() -[email protected]) / ([email protected]-[email protected]), 1), 0)

    thinkspi.com

  • Try this:<\/p>

    =MAX(MIN((TODAY() - Start@row) \/ (Finish@row - Start@row), 1), 0)<\/p>","bodyRaw":"[{\"insert\":\"Try this:\\n=MAX(MIN((TODAY() - Start@row) \\\/ (Finish@row - Start@row), 1), 0)\\n\"}]","format":"rich","dateInserted":"2023-06-26T12:00:48+00:00","insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-07-21T18:42:45+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"displayOptions":{"showUserLabel":false,"showCompactUserInfo":true,"showDiscussionLink":false,"showPostLink":false,"showCategoryLink":false,"renderFullContent":false,"expandByDefault":false},"url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382253#Comment_382253","embedType":"quote"}"> https://community.smartsheet.com/discussion/comment/382253#Comment_382253

    That worked, thanks again Paul!

    It also shows 100% complete when it is in the past which is great. What part of this formula makes it do that?

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

    =MAX(MIN((TODAY() -[email protected]) / ([email protected]-[email protected]), 1), 0)


    This does the percentage:

    (TODAY() -[email protected]) / ([email protected]-[email protected])


    This caps it at 100%:

    MIN(..............., 1)


    This keeps it from going negative for future tasks:

    MAX(..............., 0)

    thinkspi.com

  • =MAX(MIN((TODAY() - Start@row) \/ (Finish@row - Start@row), 1), 0)<\/p>

    This does the percentage:<\/p>

    (TODAY() - Start@row) \/ (Finish@row - Start@row)<\/p>

    This caps it at 100%:<\/p>

    MIN(..............., 1)<\/p>

    This keeps it from going negative for future tasks:<\/p>

    MAX(..............., 0)<\/p>","bodyRaw":"[{\"insert\":\"=MAX(MIN((TODAY() - Start@row) \\\/ (Finish@row - Start@row), 1), 0)\\n\\nThis does the percentage:\\n(TODAY() - Start@row) \\\/ (Finish@row - Start@row)\\n\\nThis caps it at 100%:\\nMIN(..............., 1)\\n\\nThis keeps it from going negative for future tasks:\\nMAX(..............., 0)\\n\"}]","format":"rich","dateInserted":"2023-06-26T13:24:44+00:00","insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-07-21T18:42:45+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"displayOptions":{"showUserLabel":false,"showCompactUserInfo":true,"showDiscussionLink":false,"showPostLink":false,"showCategoryLink":false,"renderFullContent":false,"expandByDefault":false},"url":"https:\/\/community.smartsheet.com\/discussion\/comment\/382268#Comment_382268","embedType":"quote"}"> https://community.smartsheet.com/discussion/comment/382268#Comment_382268

    Thanks Paul, very helpful as always!

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    Happy to help.

    thinkspi.com

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the公式手册模板!
This is going to be the general idea. You will want to replace the name of the column that you use for the date of the observation. I also didn't know the name of the third observation type or the time period.<\/p>

=IF([Observation Type]@row = \"Safety\", WORKDAY([Observation Date]@row, 2), IF([Observation Type]@row = \"Opportunity to Improve\", WORKDAY([Observation Date]@row, 14), IF([Observation Type]@row = \"Other Type\", WORKDAY([Observation Date]@row, 365), \"//m.santa-greenland.com/community/discussion/comment/\")))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":107920,"type":"question","name":"How to remove text to only leave numbers","excerpt":"I have a column with numbers and letters i.e 1.1a, 1.1b, 2.1a and so on and using a simple formula to remove the letter and leave number =LEFT([SubComp#]@row, (LEN([SubComp#]@row) - 1)) which works just fine, but for some reason the Conditional Formatting does not recognize the calculated output as a number to highlight…","snippet":"I have a column with numbers and letters i.e 1.1a, 1.1b, 2.1a and so on and using a simple formula to remove the letter and leave number =LEFT([SubComp#]@row, (LEN([SubComp#]@row)…","categoryID":322,"dateInserted":"2023-07-21T15:21:47+00:00","dateUpdated":null,"dateLastComment":"2023-07-21T15:31:04+00:00","insertUserID":96691,"insertUser":{"userID":96691,"name":"gwson","url":"https:\/\/community.smartsheet.com\/profile\/gwson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!bb_am_gUV_w!XFjMnwg6CTQ!MSWtq5sIJTM","dateLastActive":"2023-07-21T15:30:31+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"updateUserID":null,"lastUserID":96691,"lastUser":{"userID":96691,"name":"gwson","url":"https:\/\/community.smartsheet.com\/profile\/gwson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!bb_am_gUV_w!XFjMnwg6CTQ!MSWtq5sIJTM","dateLastActive":"2023-07-21T15:30:31+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":23,"score":null,"hot":3379907571,"url":"https:\/\/community.smartsheet.com\/discussion\/107920\/how-to-remove-text-to-only-leave-numbers","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107920\/how-to-remove-text-to-only-leave-numbers","format":"Rich","lastPost":{"discussionID":107920,"commentID":386451,"name":"Re: How to remove text to only leave numbers","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/386451#Comment_386451","dateInserted":"2023-07-21T15:31:04+00:00","insertUserID":96691,"insertUser":{"userID":96691,"name":"gwson","url":"https:\/\/community.smartsheet.com\/profile\/gwson","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!bb_am_gUV_w!XFjMnwg6CTQ!MSWtq5sIJTM","dateLastActive":"2023-07-21T15:30:31+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-21T15:35:25+00:00","dateAnswered":"2023-07-21T15:30:02+00:00","acceptedAnswers":[{"commentID":386449,"body":"

Try wrapping it in a VALUE()<\/p>

=VALUE(LEFT([SubComp#]@row, (LEN([SubComp#]@row) - 1)))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":107898,"type":"question","name":"Using MAX to get latest date by criteria","excerpt":"Hello, I am trying get the latest date in a list, subject to criteria but MAX COLLECT does not seem to work. What am I doing wrong? I have tried both a text column and a date column. =MAX(COLLECT({CQ Hours Data Range 6}, {CQ Hours Data Range 2}, Model@row, {CQ Hours Data Range 5}, Batch@row),) Appreciate any suggestions!","snippet":"Hello, I am trying get the latest date in a list, subject to criteria but MAX COLLECT does not seem to work. What am I doing wrong? I have tried both a text column and a date…","categoryID":322,"dateInserted":"2023-07-21T11:41:31+00:00","dateUpdated":null,"dateLastComment":"2023-07-21T12:14:07+00:00","insertUserID":135590,"insertUser":{"userID":135590,"name":"Jbob","url":"https:\/\/community.smartsheet.com\/profile\/Jbob","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AGNmyxY995A_sfSQHsmgUsRgqeK4EHeVdf9h7QM2bqHd=s96-c","dateLastActive":"2023-07-21T12:55:50+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":135590,"lastUser":{"userID":135590,"name":"Jbob","url":"https:\/\/community.smartsheet.com\/profile\/Jbob","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AGNmyxY995A_sfSQHsmgUsRgqeK4EHeVdf9h7QM2bqHd=s96-c","dateLastActive":"2023-07-21T12:55:50+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":35,"score":null,"hot":3379882538,"url":"https:\/\/community.smartsheet.com\/discussion\/107898\/using-max-to-get-latest-date-by-criteria","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/107898\/using-max-to-get-latest-date-by-criteria","format":"Rich","lastPost":{"discussionID":107898,"commentID":386369,"name":"Re: Using MAX to get latest date by criteria","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/386369#Comment_386369","dateInserted":"2023-07-21T12:14:07+00:00","insertUserID":135590,"insertUser":{"userID":135590,"name":"Jbob","url":"https:\/\/community.smartsheet.com\/profile\/Jbob","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AGNmyxY995A_sfSQHsmgUsRgqeK4EHeVdf9h7QM2bqHd=s96-c","dateLastActive":"2023-07-21T12:55:50+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-21T12:14:33+00:00","dateAnswered":"2023-07-21T12:03:58+00:00","acceptedAnswers":[{"commentID":386362,"body":"

HI @Jbob<\/a> <\/p>

Thanks for the post. I have tried to recreate your example (in a simple way) to see where the issue is.<\/p>

In mine the column called Date and the column called Max per Value are BOTH Date data types.<\/p>

\n
\n \n \"image.png\"<\/img><\/a>\n <\/div>\n<\/div>\n

I have exposed the formula I have used in the last column to show how the Max per Value is coming through.<\/p>

I know this has simplified your original question, but can you see how the Max(Collect()) statement works here?<\/p>

Does this help at all?<\/p>

So in yours: <\/p>

=MAX(COLLECT({CQ Hours Data Range 6}, {CQ Hours Data Range 2}, Model@row, {CQ Hours Data Range 5}, Batch@row),<\/strong>)<\/p>

Range 6 and the column you have written this formula into must be Date fields and you have an extra comma where you don't need it! Just between the last two )). This comma will cause an error.<\/p>

Kind regards<\/p>

Debbie<\/p>"},{"commentID":386369,"body":"

Hello Debbie,<\/p>

Appreciate your help, that worked perfectly!<\/p>

Thank you!<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Formulas and Functions