Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello! I'm a brand new institutional researcher at a regional college attempting to track & visualize the number of students our school retains from one semester to the next. I've found several helpful resources that look at customer retention on a monthly or yearly basis (e.g., 1) https://community.fabric.microsoft.com/t5/Power-BI-Community-Blog/Customer-Retention-Part-3-Period-O... 2) https://community.fabric.microsoft.com/t5/Desktop/Student-Retention-Term-by-Term-Fall-to-Fall-Year-b... 3) https://forum.enterprisedna.co/t/cohort-analysis-higher-education-style/3582), but can't quite figure out how to do it when the number of days in each semester varies.
Here's what I have for tables so far (no pbix yet):
Enrollment Table:
| ID | Semester | Term | Year | TermID | Dept. Code | Div. Code | First Degree | FT/PT | Level | Prog. Code | Program Sought | Tuition Status | Current Cr Hours | Cumulative Cr Hours | Cohort | Program Start |
| Student A | Fall | 2 | 2025 | 20252 | RNBS | NU | 0 | Part time | 3 | RNBSN | RNBSN | HT | 9 | 26 | Fall 2023 | 8/28/2023 |
| Student B | Fall | 2 | 2025 | 20252 | RNBS | NU | 0 | Part time | 3 | RNBSN | RNBSN | LH | 12 | 87 | Fall 2024 | 8/26/2024 |
Term Table:
| Semester | Year | Term | TermID | Code | Term Start Date | Term End Date | Cohort | Total Days |
| Spring | 2026 | 3 | 20253 | SP2026 | 2026-01-05 | 2026-04-25 | Spring 2026 | 110 |
| Fall | 2025 | 2 | 20252 | FA2025 | 2025-08-25 | 2025-12-13 | Fall 2025 | 110 |
| Summer | 2025 | 1 | 20251 | SU2025 | 2025-05-05 | 2025-08-02 | Summer 2025 | 89 |
| Spring | 2025 | 3 | 20243 | SP2025 | 2025-01-06 | 2025-04-26 | Spring 2025 | 110 |
| Fall | 2024 | 2 | 20242 | FA2024 | 2024-08-26 | 2024-12-14 | Fall 2024 | 110 |
| Summer | 2024 | 1 | 20241 | SU2024 | 2024-05-06 | 2024-08-03 | Summer 2024 | 89 |
| Spring | 2024 | 3 | 20233 | SP2024 | 2024-01-08 | 2024-04-27 | Spring 2024 | 110 |
| Fall | 2023 | 2 | 20232 | FA2023 | 2023-08-28 | 2023-12-16 | Fall 2023 | 110 |
| Summer | 2023 | 1 | 20231 | SU2023 | 2023-05-08 | 2023-08-05 | Summer 2023 | 89 |
| Spring | 2023 | 3 | 20223 | SP2023 | 2023-01-03 | 2023-04-22 | Spring 2023 | 109 |
| Fall | 2022 | 2 | 20222 | FA2022 | 2022-08-22 | 2022-12-10 | Fall 2022 | 110 |
The goal is to have it look something like this, with each of the rows denoting cohorts (aka start terms) and the columns denoting subsequent semesters:
Any insight you can provide here would be so helpful! I've been chasing my tail trying to make the business-focused tutorials I encounter work for me in higher ed, but I think I need some more training before I'm good enough to translate the info. Thanks!
Solved! Go to Solution.
Hi @Megabytze
Retention is term-to-term instead date-to-date.
So instead of
Days
Date differences
You can use
TermID as an ordered time index
Cohort = first enrolled TermID
Offset = how many terms after cohort
This is exactly how customer cohort analysis works, just replace month with term.
Model Setup
Relationships
Enrollment[TermID] → Term[TermID] (Many-to-One)
No need to use Term Start/End Date for retention logic
Required columns
From Enrollment:
StudentID
TermID
Cohort TermID (first term the student enrolled)
If you don’t have Cohort TermID, create it
Cohort TermID =
CALCULATE(
MIN(Enrollment[TermID]),
ALLEXCEPT(Enrollment, Enrollment[StudentID])
)
Create “Term Offset” (This Replaces Month 1, Month 2…)
In Enrollment
Term Offset =
Enrollment[TermID] - Enrollment[Cohort TermID]
This gives:
0 = cohort term
1 = next semester
2 = semester after that
Base Measures
Students in Cohort (Denominator)
Cohort Size =
CALCULATE(
DISTINCTCOUNT(Enrollment[StudentID]),
Enrollment[Term Offset] = 0
)
Retained Students (Numerator)
Retained Students =
DISTINCTCOUNT(Enrollment[StudentID])
Retention % Measure
Retention % =
DIVIDE(
[Retained Students],
[Cohort Size]
)
Build the Matrix Visual
Rows
Term[Cohort] or Enrollment[CohortTermID]
Columns
Enrollment[Term Offset]
Rename as
Term 1
Term 2
Term 3
Values
Retention %
(or Retained Students for the count version)
This will look exactly like your customer retention example, but by semester.
Please mark it as a solution with headup if this helps you. Thank You!
Hi @Megabytze
Retention is term-to-term instead date-to-date.
So instead of
Days
Date differences
You can use
TermID as an ordered time index
Cohort = first enrolled TermID
Offset = how many terms after cohort
This is exactly how customer cohort analysis works, just replace month with term.
Model Setup
Relationships
Enrollment[TermID] → Term[TermID] (Many-to-One)
No need to use Term Start/End Date for retention logic
Required columns
From Enrollment:
StudentID
TermID
Cohort TermID (first term the student enrolled)
If you don’t have Cohort TermID, create it
Cohort TermID =
CALCULATE(
MIN(Enrollment[TermID]),
ALLEXCEPT(Enrollment, Enrollment[StudentID])
)
Create “Term Offset” (This Replaces Month 1, Month 2…)
In Enrollment
Term Offset =
Enrollment[TermID] - Enrollment[Cohort TermID]
This gives:
0 = cohort term
1 = next semester
2 = semester after that
Base Measures
Students in Cohort (Denominator)
Cohort Size =
CALCULATE(
DISTINCTCOUNT(Enrollment[StudentID]),
Enrollment[Term Offset] = 0
)
Retained Students (Numerator)
Retained Students =
DISTINCTCOUNT(Enrollment[StudentID])
Retention % Measure
Retention % =
DIVIDE(
[Retained Students],
[Cohort Size]
)
Build the Matrix Visual
Rows
Term[Cohort] or Enrollment[CohortTermID]
Columns
Enrollment[Term Offset]
Rename as
Term 1
Term 2
Term 3
Values
Retention %
(or Retained Students for the count version)
This will look exactly like your customer retention example, but by semester.
Please mark it as a solution with headup if this helps you. Thank You!
Wow, I think that worked - I can't thank you enough for walking me through that! Is there an easy way to change the column names to Term 1, Term 2?
Your Enrollment sample table does not have enough data. Please provide sample data that covers your issue or question completely.
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |