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
dbenson
Regular Visitor

Counting how many employees worked on multiple customers

Newbie here!  This seems like an easy question, but I'm having a hard time figuring out the proper formula here.  

 

I have a database with employee names, customers they worked on and how much we paid them to work on each of those customers.  I'm trying to do a simple analysis to see the names of my employees that worked on more than one customer (and to see which exact customers they are working on).  

 

I believe the best way to represent this is a matrix table and I was running a basic Distinctcount on the employees to show the boolean values on whether they worked on a customer or not.  That part is fine.  However, I cannot get the sum at the end to see if they did in fact do more than one customer as the grand total will default to 1 for all employees as the Distinctcount looks to  be re-running for the filter context. The below table is what I am currently seeing.  Any advice here?  

 

 Customer ACustomer BCustomer CTotal
Employee A1 1 1
Employee B1 11
Employee C 1 1
Employee D  11
1 ACCEPTED SOLUTION

@dbenson

You need to UNPIVOT the data first in the Query Editor and then create the Matrix

Follow the steps outlined below...

Unpivot and Matrix.gif

Good Luck! Smiley Happy

Let me know if you have any questions!

View solution in original post

10 REPLIES 10

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.