How do I count the values in a column using beast mode?

14.76K is the total number of students (Both full-time and part-time).

What would be the formula if I only want to count the Full-time values in the Full-time/Part-time column?

And then if I want to change the count to percentage, do I need another formula for it?

Thank you.

Best Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓
     COUNT( CASE WHEN `Full-Time/Part-Time` = 'Full-Time' THEN 1 END)
    

    This case statement will return a value if your column is full time and then count that many values

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • nmizzell
    nmizzell Contributor
    Answer ✓

    Grant's solution will work if you want to count the total full time. If you want a percentage, the following extension of Grant's formula will work:

    COUNT( CASE WHEN `Full-Time/Part-Time` = 'Full-Time' THEN 1 END)/ count(`Full-Time/Part-Time`)

Answers

  • GrantSmith
    GrantSmith Coach
    Answer ✓
     COUNT( CASE WHEN `Full-Time/Part-Time` = 'Full-Time' THEN 1 END)
    

    This case statement will return a value if your column is full time and then count that many values

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • nmizzell
    nmizzell Contributor
    Answer ✓

    Grant's solution will work if you want to count the total full time. If you want a percentage, the following extension of Grant's formula will work:

    COUNT( CASE WHEN `Full-Time/Part-Time` = 'Full-Time' THEN 1 END)/ count(`Full-Time/Part-Time`)