Stumped on a formula

So we have a dashboard and am trying to do a count for legal requests. Two metrics, one would be for all requests received and completed for the current month, and the second would be all requests received and completed for the year. Here's the two formulas but they don't seem to update correctly:

Current month: =COUNTIFS({Resolved Date Range}, IFERROR(MONTH(@cell), 0) = MONTH(TODAY()))

For the year: =COUNTIFS({Resolved Date Range}, IFERROR(YEAR(@cell), 0) = YEAR(TODAY()))

What am I doing wrong?

Answers

  • Hollie Green
    Hollie Green ✭✭✭✭✭✭
    edited 06/20/23

    What error is it giving or how is the data incorrect. If incorrect data would need to see some examples.

  • It's supposed to be a live feed, but it is still showing the same calculated numbers, even though there are new requests each day that are completed.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    The immediate issue is that the TODAY function only updates when the sheet is activated. This can be done by opening and saving the sheet daily, form submissions, update request submissions, or my personal preference:

    Insert a date type column. Set up a Record A Date automation to run daily to populate this new date type column.

    This will force update the TODAY function without you having to do anything with it after the automation is set up.


    Additionally... Since you are specifying a year in your year calcs, that leads me to believe there could be multiple years within the source data. If this is the case, you are also going to want to account for the year in the Month calcs since there could be multiple years with the month of 6 in the sheet. The below will restrict it to only pull from the current month of the current year as opposed to the month of June for all years within the source data.

    =COUNTIFS({Resolved Date Range}, AND(IFERROR(MONTH(@cell), 0) = MONTH(TODAY()), IFERROR(YEAR(@cell), 0) = YEAR(TODAY())))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!