cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

Warning - Utter Newbie and First Post

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.

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.

4 REPLIES 4
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.

Microsoft Employee

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.