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

New Member

## Counting number of employees meeting target when employee data

Thank you in advance. I really appreciate the help.

Here's what I have.

1. Employee table - data is grouped by (1) employee and (2) day. Sample data:

 Name Date Calls Taken Abandoned Calls Title Susan 1/1/23 100 2 Sales I Susan 1/2/23 100 1 Sales I John 1/1/23 100 5 Sales I John 1/2/23 100 4 Sales I Dawn 1/1/23 100 3 Sales II Dawn 1/2/23 100 2 Sales II

2. Goal table - has a relationship to the Employee table based on Title

 Title Abandon Rate Target Sales I 2% Sales II 1%

3. Abandon Rate measure: sum(abandoned calls)/sum(calls)

I need a measure that would show me how many unique employees meet their target. I tried:

1. Countrows with Filter where abandonrate <= Target - this didn't work because PBI counts the employee as meeting target if they meet their abandon rate on one day even if their total average rate is below target

2. Calculate and distinctrow nested formula filtered to abandonrate <= target - getting "A function 'PLACEHOLDER" has been used" error

Any help is appreciated.

1 ACCEPTED SOLUTION
Super User

@Thanksall ,  Create measures like

m1 = divide(Sum(Employee[Abandoned]) , Sum(Table[call Taken]))

m2 = countx( Values(Employee[Name]) ,
var _target = maxx(filter(Goal, Goal [Title] =max( Employee[Title]) ), Goal[Abandon Rate Target])

return

if([M1]> _target , [Name], blank())

)

3 REPLIES 3
Super User
Super User

@Thanksall ,  Create measures like

m1 = divide(Sum(Employee[Abandoned]) , Sum(Table[call Taken]))

m2 = countx( Values(Employee[Name]) ,
var _target = maxx(filter(Goal, Goal [Title] =max( Employee[Title]) ), Goal[Abandon Rate Target])

return

if([M1]> _target , [Name], blank())

)

New Member

This works, I had to add a condition in your if function to ignore names where the abandon rate is blank, but this is exactly what I was looking for. Thank you so much.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors