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

Count of Employees Based on Start Dates

I've read multiple threads on this and still cannot get it to work. I have a column of employees, start dates, end dates. I want to be able to essentially chart over time the count of employees (line graph for example). The closest I've come is getting a count of hire on a given date (start date only). Any help? 

1 REPLY 1
kentyler
Solution Sage
Solution Sage

What granularity do you want for your chart ? days, weeks, months ?

I think you need to transform your start/end date table into a table of months say, with one row for each employee that worked that month.

Then you can just count the rows.

Of course, getting that table is the trick. You might be able to use CROSSJOIN() to get a new table that had a cartesian product for a calendar table and your employee table. So you would have an employee start date and end date for every row in the calendar. You can then add a measure that checks to see if the calendar date for that row is between the start date and end date. 1 if it is, 0 if not. Then you can filter the new table for the start and end date you want to use and just count the 1's in each period.

 





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


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.

Top Solution Authors