Forum Discussion
skasper
9 years agoResponsive Resident
Active Employees per Period
Hi, struggling with what should be simple. I have two tables ('crm_employees' and 'DimDates'). There exists a relationship between them (see picture below). What I am trying to calculate i...
- 9 years ago
Thank you for the advice. I tried it and do not get the correct result, either. What I do get is the number of employees, who left in a specific period (e.g. month).
As I have to deliver the report today, I resolved to take a different approach, showing the number of joiners, leavers and overall evolution of active personnel as in the chart below.
Anonymous
3 years agoNot applicable
HI,
Can any body help me what is wrong in this dax to get final outpu. Before dax i will explain my requirement which is simple but unable to get the result.
1. i want to find find active employees, under the cadre of manager who are active.
i have written dax as below.. Please correct me i was wrong.
Active persons =
var currentdate =
MAX('CALENDAR DATE'[Date])
return
CALCULATE(
COUNTROWS(EMPLOYEE_D),
FILTER(EMPLOYEE_D,(EMPLOYEE_D[DATE_OF_JOINING] <= currentdate
&& EMPLOYEE_D[DATE_OF_RELIEVING] >= currentdate), ALLSELECTED( EMPLOYEE_D[ACTIVE_FLG] = "Y", EMPLOYEE_D[DESIGNATION] in {"sales Manager", "sr.sales Manager"})))