I currently have an Employee Dimension, consisting of four columns:
Employee ID | Office | Contract Start Date | Contract End Date
I would like to use this to calculate the number of employees in each month, grouped by different offices, as shown in the following figure.
The pseudocode would be something like:
Count(Employee.EmployeeID, Date.Month > Employee.ContractStartDate && Date.Month < Employee.ContractEndDate)
Do you know how to implement this calculation?
Thank you in advance!