Forum Discussion
Cummulative Running Total
- Anonymous4 years ago
Hi Murali777 ,
Could you please share some raw data in your employee table with us in order to provide you a suitable solution? Besides that, you can refer the following links to get the employee count over time.
Employee Headcount history changes
Headcount_4 = CALCULATE ( [HeadCount] FILTER ( Worker_Hist; Worker_Hist[Start Date] <= MAX ( Calendar[Date] ) && ( Worker_Hist[End Date] > MAX ( Calendar[Date] ) || ISBLANK ( Worker_Hist[End Date] ) ) ) )Total Number Of Staff Over Time - Power BI Insights
Optimizing HR Head Count DAX Measure with Power BI
Head Count = VAR FromDate = MIN('Date'[Date]) VAR ToDate = MAX('Date'[Date]) RETURN CALCULATE ( COUNTROWS( Employee ), Employee[HireDate] <= ToDate, Employee[LeaveDate] >= FromDate || ISBLANK(Employee[LeaveDate]), REMOVEFILTERS('Date') )Best Regards
still confused about this.
I can understand that by the end of 1999, the two empoyee of 1997 have left. However, the empcount for 1999 is 1. Why not 1+2+1-2. What's the meaning of empcount column?
Employee count is the count of employee id. I have created one Rownumber column =1 in my model, based on the department i aggregating the Rownumber column as EmpCount.
- Anonymous4 years agoNot applicable
Hi Murali777 ,
Could you please share some raw data in your employee table with us in order to provide you a suitable solution? Besides that, you can refer the following links to get the employee count over time.
Employee Headcount history changes
Headcount_4 = CALCULATE ( [HeadCount] FILTER ( Worker_Hist; Worker_Hist[Start Date] <= MAX ( Calendar[Date] ) && ( Worker_Hist[End Date] > MAX ( Calendar[Date] ) || ISBLANK ( Worker_Hist[End Date] ) ) ) )Total Number Of Staff Over Time - Power BI Insights
Optimizing HR Head Count DAX Measure with Power BI
Head Count = VAR FromDate = MIN('Date'[Date]) VAR ToDate = MAX('Date'[Date]) RETURN CALCULATE ( COUNTROWS( Employee ), Employee[HireDate] <= ToDate, Employee[LeaveDate] >= FromDate || ISBLANK(Employee[LeaveDate]), REMOVEFILTERS('Date') )Best Regards