Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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

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

    • Anonymous's avatar
      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