How do I count the # of Flags and create a widget?

Options

I would like to count the number of flags of each color under project type and put them into my metric sheet and reference them for a widget chart:

So for instance, I want to count the number of yellow, green, blue and also red flags, with their prospective description and put them into the metric sheet:

What formula do I use to do this so that I can get the counts of each flags?


Thank you!

Answers

  • Ray Lindstrom
    Ray Lindstrom ✭✭✭✭✭✭
    Options

    Hi IlonaK,

    You first need to create a cross-sheet reference on your metric sheet to look at the Project Type column in your main sheet. Say you named the cross-sheet reference "Project Type", and selected the entire Project Type column as the reference.

    Then in your metric sheet, you can have that line item for Project Type, and in following 4 columns, paste this formula.

    =COUNTIF({Project Type}, "Red")

    =COUNTIF({Project Type}, "Yellow")

    =COUNTIF({Project Type}, "Green")

    =COUNTIF({Project Type}, "Blue")


    Hope that helps!

    All the best,

    -Ray

  • Ray Lindstrom
    Ray Lindstrom ✭✭✭✭✭✭
    edited 11/17/22
    Options

    Hi again IlonaK,

    Another approach would be to stay in your main grid and use your Sheet Summary section, and create 4 new fields. Then use these formulas for each field. Then you could create a "Sheet Summary Report" to capture this for your dashboard widget. When you create a new Report, select Sheet Summary Report instead of Row Report.

    =COUNTIF([Project Type]:[Project Type], "Red")

    =COUNTIF([Project Type]:[Project Type], "Yellow")

    =COUNTIF([Project Type]:[Project Type], "Green")

    =COUNTIF([Project Type]:[Project Type], "Blue")


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!