Forum Discussion

alexcatala's avatar
alexcatala
Icon for Helper IV rankHelper IV
5 years ago
Solved

employees under 23 dynamic

Hi, I am trying to figure it out the number of employees under 23 who are currently active.   I have the formula for the employees under 23 :   23 age = CALCULATE(COUNTROWS(FILTER('f_Employees',...
  • amitchandak's avatar
    amitchandak
    5 years ago

    alexcatala , if age is a column

    active2 employees = var currentdate = MAX(d_DateTable[Date])
    return CALCULATE(DISTINCTCOUNT(f_Employees[EmplCode]),f_Employees[EmpJoinDate]<=currentdate,or(ISBLANK(f_Employees[EmpLeavDate]),f_Employees[EmpLeavDate] > currentdate),'f_Employees',f_Employees[EmpAge] <=23)

     

    if measure please share formula