Hi
I have just started using PP and need help. I need to calculate the number of current and terminated employees for a given month.
An employee is considered active at the beginning of a month if start date <= first day of month and termination date is blank or >= second day of the month.
My data table has employee code (unique), start date and termination date (date of termination or blank if still working). I also have a dimCalendar table with DateInt (every day as d/mm/yyyy 12:00:00 AM) and MonthInCalendar (1/10/2011, 1/11/2011 etc). Employee start date and termination date are the same format as DateInt. I have linked start date and termination date to DateInt (start date is a dashed line)
My measures are:
[Total employee] = distinctcount([Employee code])
[# terminations] = calculate([Total employee], not(isblank(employeetable[termination date]))
I have several questions:
1. when I filter the termination date in the PP table to July 2013, [Total employee] = 11 and [# terminations] = 82 yet when I use [# terminations] in a pivot table against July 2013 = 11. Why?
2. how do I calculate the number of active employees at the beginning of a month? I need to re-use the measure in a pivot table against 12 months in a year.
Thanks
I have just started using PP and need help. I need to calculate the number of current and terminated employees for a given month.
An employee is considered active at the beginning of a month if start date <= first day of month and termination date is blank or >= second day of the month.
My data table has employee code (unique), start date and termination date (date of termination or blank if still working). I also have a dimCalendar table with DateInt (every day as d/mm/yyyy 12:00:00 AM) and MonthInCalendar (1/10/2011, 1/11/2011 etc). Employee start date and termination date are the same format as DateInt. I have linked start date and termination date to DateInt (start date is a dashed line)
My measures are:
[Total employee] = distinctcount([Employee code])
[# terminations] = calculate([Total employee], not(isblank(employeetable[termination date]))
I have several questions:
1. when I filter the termination date in the PP table to July 2013, [Total employee] = 11 and [# terminations] = 82 yet when I use [# terminations] in a pivot table against July 2013 = 11. Why?
2. how do I calculate the number of active employees at the beginning of a month? I need to re-use the measure in a pivot table against 12 months in a year.
Thanks