- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count based on condition - Completion Status
Hi,
I need to create a measure to count employees that completed modules ( module completed if all learnings associated are completed)
EMPLOYEE ID | LEARNING | LEARNING STATUS | MODULE |
3421 | Microsoft Excel | Complete | Microsoft Office |
3421 | Microsoft Word | Incomplete | Microsoft Office |
1111 | Microsoft Excel | Complete | Microsoft Office |
2112 | Microsoft Excel | Complete | Microsoft Office |
2122 | Microsoft Word | Complete | Microsoft Office |
3222 | Business Language | Incomplete | Communication Skills |
Target value ( Modules completed):
Microsoft Office = 3
Thanks in advance,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Silly mistake on my side.
1. Build a support measure:
Courses =
COUNTROWS('Table')
2. This will return the number of employees who completed all their modules:
SUMX(
VALUES('Table'[EMPLOYEE ID]),
IF([Courses] = CALCULATE([Courses],KEEPFILTERS('Table'[LEARNING STATUS] = "Complete")),1,0)
)
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's another approach:
COUNTROWS (
FILTER (
VALUES ( Table2[EMPLOYEE ID] ),
CALCULATE ( SELECTEDVALUE ( Table2[LEARNING STATUS] ) ) = "Complete"
)
)
This works because if there are multiple values, then SELECTEDVALUE returns a blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try:
SUMX(
VALUES( Tablename[EMPLOYEE] ),
IF(
DISTINCTCOUNT( Tablename[LEARNING] ) =
CALCULATE(
DISTINCTCOUNT( Tablename[LEARNING] ),
KEEPFILTERS( Tablename[STATUS] = "Complete" )
),
1,
BLANK()
)
)
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @rbriga
I have tried this. . It seems like it's not working; it's showing a blank result. Any other suggestions . .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Silly mistake on my side.
1. Build a support measure:
Courses =
COUNTROWS('Table')
2. This will return the number of employees who completed all their modules:
SUMX(
VALUES('Table'[EMPLOYEE ID]),
IF([Courses] = CALCULATE([Courses],KEEPFILTERS('Table'[LEARNING STATUS] = "Complete")),1,0)
)
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry , It should be 3. it was a typo. . it's a count of employees who completed the modules. I have updated the post. your help is highly appreciated 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just to clarify- why is the expected result = 2?
If it's a count of emplyees who finished their courses, there are 3 (1111,2112,2122);
If it's a count of learnings that all employees (assigned) finished, there's 1 (Microsoft Excel).
What are the 2 you expect to count, in this example?
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
09-30-2024 04:54 AM | |||
10-09-2024 09:44 AM | |||
06-24-2024 06:14 AM | |||
06-17-2024 01:17 PM | |||
07-30-2024 10:24 PM |
User | Count |
---|---|
24 | |
13 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
13 | |
12 | |
10 |