Forum Discussion
mdalton
Helper I
3 years agoCountIF Active Employee Based on Hire/Term Date
I am currently updating AWS SQL data in PowerBI to get the most updated hire/term dates for employees. I then copy a table with employee ID, hire date, and term date into excel. In a new sheet I hav...
- 3 years ago
I am going to answer my own question:
Import excel sheet of WeekOf and WeekEnding named Week
New Column:
ActiveEmployees = if(Week[WeekOf]>TODAY(),0,CALCULATE(COUNTA(Hires_Terms_Summary[Employee ID]),FILTER(all(Hires_Terms_Summary),and(Hires_Terms_Summary[Hire Date]<=Week_Branch[WeekEnding]),Hires_Terms_Summary[TermDate]>Week_Branch[WeekEnding])))
Worked for me and verified it against my excel sheet.
mdalton
Helper I
3 years agoI am going to answer my own question:
Import excel sheet of WeekOf and WeekEnding named Week
New Column:
ActiveEmployees = if(Week[WeekOf]>TODAY(),0,CALCULATE(COUNTA(Hires_Terms_Summary[Employee ID]),FILTER(all(Hires_Terms_Summary),and(Hires_Terms_Summary[Hire Date]<=Week_Branch[WeekEnding]),Hires_Terms_Summary[TermDate]>Week_Branch[WeekEnding])))
Worked for me and verified it against my excel sheet.