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

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

Reply
kl8818
Frequent Visitor

Count Measurement Help

Hi - need help creating a measurement.

 

Here is a sample of my data:

Item IDCourse TitleUser IDLast NameFirst Name                            Completion StatusCompletion Date
000001Course A12345DoeAllisonComplete4/21/2023
000001Course A23456DoeJohnComplete 4/21/2023
000001Course A34567DoeMarkComplete9/26/2022
000002Course B34567DoeMarkComplete9/26/2022
000002Course B34567DoeMarkComplete9/26/2022
000003Course C34567DoeMarkComplete9/26/2022
000004Course D34567DoeMarkComplete 9/26/2022
000001Course A45678DoeBethComplete9/26/2022
000001Course A56789DoeErikaComplete9/28/2022
000002Course B45678DoeBethComplete 10/3/2022
000003Course C45678DoeBethComplete10/3/2022
000004Course D45678DoeBethComplete 10/3/2022

 

What I would like to do is have a count for each user ID IF they have a completion for EACH course. So only count Mark Doe if he has completed Course A, B, C, and D.

3 REPLIES 3
sjoerdvn
Super User
Super User

try something like this

Count Users Completed All =
VAR coursecount =  DISTINCTCOUNT(Table[Course], ALL())
RETURN COUNTROWS(FILTER(VALUES(Table[User ID]),
	CALCULATE(DISTINCTCOUNT(Table[Course])) = coursecount
)) 
Mahesh0016
Super User
Super User

@kl8818 I hope this helps you.

Count User ID =
CALCULATE(
    COUNT('Table A'[User ID]),
    ALLEXCEPT('Table A','Table A'[Course Title],'Table A'[Completion Status])
)

Mahesh0016_0-1694846916194.png

 

Hi - thank you for your response. It is still not filtering correctly with that formula. It is counting every line not filtering if the user has completed Course A, B, C, D, and E. I have some users who have only completed Course A and B for example and I do not want to count them in this measurement. 

Helpful resources

Announcements
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.