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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Pbrit
Frequent Visitor

Get the Sum of distinct count

Dear Community Members,

 

I have a dax calculation that gets the count of students that were admitted 4 years ago.

My challenge is how to sum it, the result gives me the last value as the total instead of the sum of each row.

 

Please find my DAX query below:


Student Count Adm 4Yrs =
CALCULATE(
DISTINCTCOUNT(Admissions[AUGSTNO]),
DATEADD(DATESYTD(DimDate[Date]),-4,YEAR),
USERELATIONSHIP(Admissions[AUGSTNO],Graduation[GSTNO])
)

What I expect is the total to be the sum of the Student Count Adm 4yrs for each year.

Any direction to resolve this would be appreciated. 
Table showing the last value as the totalTable showing the last value as the total

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @Pbrit try test measure below
Test =

 
SUMX(
VALUES(DimDate[Year]),
[Student Count Adm 4Yrs]
)

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

2 REPLIES 2
Pbrit
Frequent Visitor

@some_bih Thank You, 
This worked.

some_bih
Super User
Super User

Hi @Pbrit try test measure below
Test =

 
SUMX(
VALUES(DimDate[Year]),
[Student Count Adm 4Yrs]
)

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.