Where could the invalid expression be in this script? I'm receiving the "script error" message while running the script. The error "Error: Invalid expression" is shown in the Script Execution Progess dialog box.
LOADEmpMonthYearasMonthYear, BusinessUnitas[Business Unit], DepartmentNoas[Department No], DepartmentNameas[Department Name], WorkCenteras[Work Center], PayGroupas[Pay Group], sum(EmpRecordCtr) asHeadcount, NetWorkDays(MonthStart(min(MthSrt)),MonthEnd(max(MthEnd))) as WorkingDays Resident Employees GroupbyEmpMonthYear, BusinessUnit,DepartmentName,WorkCenter,PayGroup; /* Grouping is made according to EW Organization's hierarchy. */ ENDSUB/* Headcount_Summary */
If you use a group by statement, every field in the LOAD or SELECT must either be in an aggregate expression (like Sum or Max) or in the group by expression. As the previous post states, you have omitted some fields from the group by.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein