Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
felipetorresv
Regular Visitor

Issue with DAX formula at calculate first year's student retention

Hi all the community,

I'm writing becasue I have the following issue:pic 1pic 1Y have the following matrix (pic), showing the number of freshmen student per cohort and their presence trought next years (for example, in cohort 2017, there was 147 and for that set of students, in 2018 there was 123 and today there is 108 (third year) students.

I want to show the same matrix but with the first year's retention, second year retention an so on. I tried with the following DAX formula:

Retención_6_años = VAR 
Year1 = CALCULATE(COUNT(Hoja1[ALU_RUT]);FILTER(ALLSELECTED(Hoja1[AÑO_CURSADO_ING_CARRERA]);Hoja1[AÑO_CURSADO_ING_CARRERA]=1))
RETURN DIVIDE(COUNT(Hoja1[ALU_RUT]);Year1)

where the values of the column "AÑO_CURSADO_ING_CARRERA" of my dataset are the columns of the matrix (pic 1).
BUT, the result are as follows (pic 2)pic2.JPG:

 

as yo can see, the first result, 119.23%, should be the result of (155/177), but is clearly not correct. 

Help please!! 

Many thanks in advance...

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@felipetorresv 

 

You may check if DISTINCTCOUNT works.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors