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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jase71ds
Advocate I
Advocate I

( COUNTIFS ) Count # of times an employee's name is in table, but only if there are completion dates

 

 

Warning - Utter Newbie and First Post Man Sad

 

Summary - Two tables (one has unique Employee ID values and is where I want the results returned.

I want to do two things, count how many times each employee's name appears in the Employee_Data_Table, and count how many times a date appears. By counting how many times their name appears, I will know how many courses they were assigned. By counting date appearances, I will know how many of their assigned courses they have completed.

 

 PBI_Example.gif

 

Thanks for any help. I am only 1 week into PBI and it's different enough from Excel that I'm struggling.

1 ACCEPTED SOLUTION

Thanks to both of you. I've got it working. As usual, the problem was the guy at the keyboard - otherwise known as "Operator Error".

Again, Thanks - I really appreciate the help and donation of your time.

View solution in original post

4 REPLIES 4
chethan
Resolver III
Resolver III

@Jase71ds

 

Create a DAX Function 

 

Assigned Courses = COUNT(EmpTable[EmpID])
Completed Cours = COUNT(EmpTable[Completed Course])

& find the sample file attached here

chethan - thanks for your time and help!

 

I've gotten your first DAX to work. The second, however, is counting ALL the Completion Dates, but not according to each Employee.

 

Some real examples of what I'm getting:

Paul A. is assigned 22 and has completed 2192

Mike A. is assigned 13 and has completed 2192

Jeremy B. is assigned 6 and has completed 2192

 

The first function rightly takes into account the Employee ID.

The second will need to take into account Employee ID, but only if there is an associated Completion Date. As it currently stands, it is ignoring Employee ID and just counting all the completion dates in the table (2192)

 

Jase.

Hi @Jase71ds,

It's weird, the employee's name and completed data come from the same one of factual table? If it is, please try to create a measure using the formula below, and check if it works fine.

Completed Cours1 = CALCULATE( COUNT(EmpTable[EmpID]),FILTER(EmpTable,EmpTable[Completed Course]<>BLANK()))


Best Regards,
Angelia

Thanks to both of you. I've got it working. As usual, the problem was the guy at the keyboard - otherwise known as "Operator Error".

Again, Thanks - I really appreciate the help and donation of your time.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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