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
Anonymous
Not applicable

Distinct Count of Employees

Hi All, 

 

I'm hoping the experts here can help me with a measure that I'm trying to create.  Here is my data model. Table 1 is connected to Table 2 in a single direction Many to one relationship. Table 2 is connected to Table 3 in a Many to one Both direction relationship. I need measure that will count the distinct number of employees that have a a certain product.  For example, If I put the Manger ID and the measure (the one I need created) in a table, I want to be able to filter on a product and get the distinct count of employees for each manager.  Is that possible?

 

Table 1

OpportunityCustomer IDCustomer NameProductQty
DX-141234ABCBlue3
DX-141234ABCGreen5
DX-155678ABC123Green7
DX-155678ABC123Blue9
DX-155678ABC123Black11
DX-155678ABC123Red13
DX-168798ABC456Red15
DX-168798ABC456Orange17
DX-168798ABC456Purple19
DX-168798ABC456Blue21
DX-173648ABC789Purple23
DX-173648ABC789Red25
DX-173648ABC789Black27
DX-173648ABC789Yellow29

 

Table 2

Customer IDCustomer Name
1234ABC
5678ABC123
8798ABC456
3648ABC789

 

Table 3

Manager IDEMP IDCustomer IDCustomer Name
B12A12341234ABC
B12A12348798ABC456
B11A12388798ABC456
B12A12373648ABC789
B11A12383648ABC789
B11A12393648ABC789
B11A12351234ABC
B11A12361234ABC
B11A12355678ABC123
B11A12353648ABC789
B12A12371234ABC
B12A12375678ABC123
B12A12378798ABC456
B11A12363648ABC789
2 REPLIES 2
ZunzunUOC
Resolver III
Resolver III

Hi @Anonymous , could you share your expected result data?

Anonymous
Not applicable

For example, If I were to filter on Blue I would expect to see Manager B12 with a count of 2 employees and Manager B11 with a count of 3 employees.

 

Results

ManagerProductEmployee Count
B12Blue2
B11Blue3

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.