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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Headcount for Terminated Employees

Hello,

 

I am fairly new to Power BI and I am trying to create a measure that will produce a headcount for terminated employees. I am using Pivots in Excel to check the accuracy of the measure and it's not producing the correct number.

 

Please note: Not all employees with termination dates are necessarily terminated because we people that are rehired.

This is the current measure I am using:

Terminated Employee Count = VAR currentDate = MAX( 'Calendar 2'[Date])  return CALCULATE( COUNTROWS('Emp Data' ), FILTER('Emp Data',(
    ISBLANK('Emp Data'[Job Termination Date]) = FALSE() 
&& 'Emp Data'[Job Termination Date] <= currentDate && 'Emp Data'[Job Rehire Date] < 'Emp Data'[Job Termination Date] && 'Emp Data'[Job Termination Date] >= MIN('Calendar 2'[Date])
)))

 

Any help appreciated!


Sample Data below:

 

Employee IDEmployee StatusHire DateJob Rehire DateService DateJob Termination Date
1000000Terminated01/09/2017 01/09/201706/28/2019
1000002Active08/22/2016 08/22/2016 
1000004Active04/10/2017 04/10/2017 
1000006Active10/12/2015 10/12/2012 
1000008Active08/14/2002 08/14/2002 
1000010Active05/16/2011 05/16/2011 
1000012Active04/27/2009 04/27/2008 
1000013Terminated05/31/2016 05/31/201607/05/2019
1000014Terminated04/24/2017 04/24/201712/06/2018
1000015Active01/28/2008 01/28/2008 
1000018Terminated10/20/2014 10/20/201410/19/2018
1000019Active10/16/2017 10/16/2013 
1000022Terminated08/31/2015 11/27/201706/28/2019
1000023Active11/23/2015 11/23/2015 
1000025Terminated01/17/201501/22/201801/17/201505/31/2018
1000027Active04/10/2017 04/10/2017 
1000028Terminated05/09/2005 05/09/200507/12/2019
2 REPLIES 2
adeeln
Post Patron
Post Patron

Create an inactive relationship of your date dimension with the termination date

then use this measure 

Termination =
CALCULATE (
    COUNT ( FactTable[TerminationDate] ),
    USERELATIONSHIP ( DimDate[Date], FactTable[TerminationDate] )
) + 0

 

 

Anonymous
Not applicable

We need to see:

 

1. The full model.

2. A CLEAR description of the procedure that is supposed to produce the correct number for any selection of attributes.

 

Then and only then can we work on this.

 

Best

Darek

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.