Beast Mode: Why am I not getting the correct number of enrollments per academic year?

I created a Beast Mode calculation to extract the academic year based on term codes.

For example, to derive the academic year 1955-1956, I identified these three term codes: 1555, 1561, and 1563.

1555 is Fall 1955. The 2 digits in between are the year. (The last digit ‘5’ represents Fall).

1561 is Winter 1956. (The last digit ‘1’ represents Winter).

1563 is Spring 1956. (The last digit ‘3’ represents Spring).

This is my beast mode calculation to get the number of enrolled students.

My Beast Mode calculation correctly shows the number of enrolled students when filtering by term code. However, when I filter by academic year, the totals are incorrect because the three terms are not summing up properly.

I need a way to aggregate enrollments across all terms in the same academic year so that when I filter by academic year, it correctly sums the enrollments for Fall, Winter, and Spring.

Do you know how I can achieve this in Beast Mode?



Tagged:

Best Answer

  • DavidChurchman
    edited February 4 Answer ✓

    The "DISTINCT" in your COUNT(DISTINCT) will make it so each student is only counted once across whatever level of aggregation you are using in your card. Since students tend to be the same across fall/spring/summer, your count across the terms will be closer to the count of a single term than the sum of the terms. That might be the desired behavior in some cases, as it would be useful to know how many distinct students you have in a given year.

    But students typically enroll/pay by term, so it sounds like you want to get a sum of the distinct students by term. If that's the case, you should add a "FIXED" to your beastmode. Something like this:

    SUM(COUNT(DISTINCT STUDENT ID) FIXED(BY Term) )

    Please 💡/💖/👍/😊 this post if you read it and found it helpful.

    Please accept the answer if it solved your problem.

Answers

  • DavidChurchman
    edited February 4 Answer ✓

    The "DISTINCT" in your COUNT(DISTINCT) will make it so each student is only counted once across whatever level of aggregation you are using in your card. Since students tend to be the same across fall/spring/summer, your count across the terms will be closer to the count of a single term than the sum of the terms. That might be the desired behavior in some cases, as it would be useful to know how many distinct students you have in a given year.

    But students typically enroll/pay by term, so it sounds like you want to get a sum of the distinct students by term. If that's the case, you should add a "FIXED" to your beastmode. Something like this:

    SUM(COUNT(DISTINCT STUDENT ID) FIXED(BY Term) )

    Please 💡/💖/👍/😊 this post if you read it and found it helpful.

    Please accept the answer if it solved your problem.

  • @DavidChurchman I didn't see that. Thank you!