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

Sum of Distinct Count of Employees per Day

Hi,

 

I am trying to create a measure or column that displays the total number of distinct employees working each day for each of the past 2.5 years. I created a work-around formula:

Employees/day = calculate(DISTINCTCOUNT('Table'[*Employees])-1,filter('Table','Table'[Date Day]=earlier('Table'[Date Day])))
but this does not allow me to filter on a specific employee when I try to create a table, since my measure only shows the total number of employees per year..
 
SUMX of the distinctcount of employees also does not work because I want to display the overall number of employees by each type of description. If I use SUMX, the calculation filters based on the description and does not give the total employees for each description.
 
Is there another formula I can use to allow me to display the total employees for different descriptions but also allow me to filter for how many days a specific employee worked/year?
 
Please let me know if there is anything I can clerify 
Thank you!
Sarah 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amitchandak , this gave me 0s as all the values...

 

Thank you!
Sarah

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

sumx(values('Table'[Date Day]), calculate(DISTINCTCOUNT('Table'[*Employees])))

 

or

 

sumx(values('Table'[Date Day]), calculate(DISTINCTCOUNT('Table'[*Employees])-1))

Hello Friend. It's Just what i need. But i have a problem with the total. Each value in resume (table) it's ok but in the total doesn't match without any filter

Hi,

Share the download link of the PBI file and show the problem very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @amitchandak , this gave me 0s as all the values...

 

Thank you!
Sarah

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.