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
DanielB_NL
Frequent Visitor

Creating table of number of active employees per department in different years/months

Hi all,

I want to make a table to get info about fluctuations in numbers of employees per department, but I can't solve it. I hope someone can help me out.

 

I have a table with employee data and in this table, among other columns, there are two date columns: 

  • in_service_date: the date the employee started at the company (first started at 1995).
  • out_service_date: the date the employee left the company:
    • if it has a value in the past, the employee has left the company
    • if it is empty (null value?), the employee is still working at the company
    • if it has a value in the future, the employee will leave the company in upcoming time (for example, when retirement date is known)

Now, I would like to create a table to see the fluctuations in numbers of employees per department in time. So for each year/month/date I need to check whether the employee was working at the company. I think the check has to be something like 'AND(date >= in_service_date, OR(date < out_service_date, out_service_date<>BLANK()))'?!

 

See the image below for an example of the table I would like to generate. My question is: can someone tell me how to do this? Thanks in advance for your reply!

 

Counting_employees_in_period.jpg

1 ACCEPTED SOLUTION
2 REPLIES 2

Thank you! I've used the 'current employees' formula and it worked fine. Thanks!

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.