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?
Best 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(BYTerm
) )Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
1
Answers
-
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(BYTerm
) )Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
1 -
@DavidChurchman I didn't see that. Thank you!
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 303 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 104 SQL DataFlows
- 640 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 769 Beast Mode
- 72 App Studio
- 43 Variables
- 718 Automate
- 185 Apps
- 462 APIs & Domo Developer
- 57 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 402 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 135 Manage
- 132 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive