Counting single values with multiple criteria

Keith Turk
Keith Turk ✭✭✭
edited 02/07/24 in Formulas and Functions

I need a little help with a formula in Smartsheet, I am trying to count the number of employees who are over utilised (> 105) but some employees have multiple entries (same utilisation, so only need 1 entry in the count). Answer below should be 3


Best Answer

  • Antonie B
    Antonie B ✭✭✭
    Answer ✓

    @Keith Turk -

    Have you tried incorporating the formula function Distinct (https://help.smartsheet.com/function/distinct)?

    It will only look for unique values.

    I think in your case, you may want to opt for a Count/Distinct/Collect formula. This will count the unique values based on your parameters, in this case, the utilization being over 105.

    Based on your screenshot try this: =COUNT(DISTINCT(COLLECT(Name:Name, Utilisation:Utilisation, >105)))

    Name:Name would be the column housing the names and Utilisation:Utilisation would be the column housing the numbers.


    I hope this helps?

Answers

  • Antonie B
    Antonie B ✭✭✭
    Answer ✓

    @Keith Turk -

    Have you tried incorporating the formula function Distinct (https://help.smartsheet.com/function/distinct)?

    It will only look for unique values.

    I think in your case, you may want to opt for a Count/Distinct/Collect formula. This will count the unique values based on your parameters, in this case, the utilization being over 105.

    Based on your screenshot try this: =COUNT(DISTINCT(COLLECT(Name:Name, Utilisation:Utilisation, >105)))

    Name:Name would be the column housing the names and Utilisation:Utilisation would be the column housing the numbers.


    I hope this helps?

  • Keith Turk
    Keith Turk ✭✭✭

    Perfect, thanks Antonie, the DISTINCT function is new to me. The learning never stops. :)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!