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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.