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

Count number of employees

Hi, I would like to count the number of active employees in a given period. In the end we wannt to analyse if the company is    more productive (revenue divided by total hours or number of employees) after growing or before growing (they have gone from 9 employees to 19 employees mid 2019).

 

I have a facttable: FactHarvest which is a table where employees fill in their time registration, it looks like this:

Date - Hours - Client - Project - Task - Type - Name  Employee -  Billable - Billable rate - billable amount - Cost rate - Cost amount

And I have a dim table with all of the employees

 

Is there a way to count the  number of employees and get theem on a graph and see when the number of employees have grown?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

The solution to my problem was actually really simple in the end. I fixed part one with following formula 😅

 

EmployeeCount = CALCULATE(DISTINCTCOUNT(FactHarvest[NameEmployee]))
 
Part two after that step wass relative simple as well:
 
ProductivityIncomeHours = DIVIDE([totalIncome];[TotalHours])
ProductivityOutcomeHours 
= DIVIDE([TotalExpense];[TotalHours])
ProductivityIncomeEmployees = DIVIDE([totalIncome];[EmployeeCount])
ProductivityOutcomeEmployees = DIVIDE([TotalExpense];[EmployeeCount])
 
This resulted in this Graph:
ProductivityPlusEmployee.PNG
 
Now need to figure out how I can get rid of the "false negative number" of employees count which is due to having an empty value on my months.

View solution in original post

12 REPLIES 12
Anonymous
Not applicable

The solution to my problem was actually really simple in the end. I fixed part one with following formula 😅

 

EmployeeCount = CALCULATE(DISTINCTCOUNT(FactHarvest[NameEmployee]))
 
Part two after that step wass relative simple as well:
 
ProductivityIncomeHours = DIVIDE([totalIncome];[TotalHours])
ProductivityOutcomeHours 
= DIVIDE([TotalExpense];[TotalHours])
ProductivityIncomeEmployees = DIVIDE([totalIncome];[EmployeeCount])
ProductivityOutcomeEmployees = DIVIDE([TotalExpense];[EmployeeCount])
 
This resulted in this Graph:
ProductivityPlusEmployee.PNG
 
Now need to figure out how I can get rid of the "false negative number" of employees count which is due to having an empty value on my months.
Anonymous
Not applicable

amitchandak
Super User
Super User

Anonymous
Not applicable

Thanks, is any of this possible without having start-end dates?

@Anonymous  - Yes, I believe it is. Seems like what you need is to get a table that counts the number of employees on each day. Then you could get the maximum of that table. Seems possible. Hard to tell without sample data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  thanks for your answer, I have refined my question with soome Sample data, should I edit my question or make a new threat? It looks like this now:

 

Hi everyone, I have a question that consist of 2 parts. Part 1 is count active Employees over a given period. Part 2 is to check if the company is more productive with more/fewer employees.

 

PART 1

I would like to count the number of active employees in a given period.

 

I have a facttable: FactHarvest which is a table where employees fill in their time registration, it looks like this:

DateClientProjectHoursBillableBillable RateBillable AmountTaskTypeNameEmployee
dinsdag 1 januari 2019Data WiseCloud Architecture8No86688InternNon-billableKlaas Wouters
Woensdag 6 februari 2019 AbInbevCustomer interaction PoC8Yes90720Billable Customer TimeBillableKlaas Wouters
Vrijdag 1 maart 2019Data WisePyspark8Yes90720Customer TimeBillableAstrid Lemmens
Vrijdag 1 maart 2019Data WisePyspark8Yes90720Billable Customer TimeBillableKlaas Wouters



And I have a dim table with all of the employees, further there is no information in this table!

Name
Klaas Wouters
Astrid Lemmens

 

 

In the Sample data a new Employee has joined the company on vrijdag 1 maart 2019 (Astrid Lemmens). The end goal would be a (line)graph: X-Axis Month, Y-Axis number of Employees. The line graph should show the trend of employee growth/decline like this: 

Graph.PNG

 

 

PART 2

In the second part we want to check if the increase of Employees has a positive affect on Productivity. So we want to:

- Divide revenue by TotalHours worked or by Total Employees of that period

- Divide Costs by TotalHours worked or by Total Employees of that period

 

Herefor I have another Facttable used:  FactSilverfin which looks like this:

Line ItemMonthValueTrue ValueUitgave (Outcome)Inkomsten (Income)MonthnameLevel
749000 Diverse bedrijfsopbrengstenPTD 01/2019-763,22-763,22-763,220dinsdag 1 januari 20192
700000 OmzetPTD 02/20192338233802338vrijdag 1 maart 20192
602102 Consultant 3PTD 12/20198250-8250-82500zondag 1 december 20192
612090 RestaurantkostenPTD 11/2019661,7-661,7-661,70vrijdag 1 november 20192
700001Omzet 1PTD 03/20199091,49091,409091,4vrijdag 1 maart 20192

 

Thus what we want to do with these data is see how the number of Employees influences our revenue and costs.

Any ideas how to do this?

Thanks

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

How would you know the period they were active in?

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Anonymous
Not applicable

Anonymous
Not applicable

I don't need/want to know for each employee when they were active. I just need to know for example for 2019 at what moment there were more employees active.

I think that seeing a representation of the data and not just column names would go a long way. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Sure you can use pattern in the attached file as long as you have employee start and end dates.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Anonymous
Not applicable

I don't have any start-end dates.  Is it possible to calculate this without start and end dates?

 

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.