Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mds123
Frequent Visitor

Calculating the count of hired and fired employees every two week

Hello, 
I have two tables. One is a generic dates table that also has a column for which 2 week period it is in the year. I also have a table that lists employees with their start and end dates. I'm trying to calculate how many employes had their first date and last date for every two week period. If the employee is still at the company, the end date colum is blank.

 

I tried solving this problem by creating two measures. One that counted that the number of rows of in the hired date column and a measure that counted the number of non-blank rows in the end date column.

 

The relationship between the two tables is based on the start date. When I try to display the period with those two measures, what I found was the end date was counting based off the employees that had a start date in that two-week period and not counting the number of end dates in that period. 

 

Does anyone have any recommendation on how I can show the number of first and last days in a two week period?  Below is an example of the data.

 

EmployeeStart DateEnd Date
Bill1/1/20237/2/2023
Kim1/1/2023 
1 REPLY 1
foodd
Super User
Super User

From your small sample data table, the start and end dates are both Sundays.   

 

foodd_1-1691095538351.png

 

 

Would you clarify the start and end days for the work week, and if this or an offset for the calendar week is included in your dedicated Dates Table. 

 

Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors