Hello Project Server Helper,
I use this query to check the remaining work off all resources for the next 52 weeks. I try for a couple of hours to add the resource capacity with no success. the output is to create an .odc file and make a graph to see the loading/capacity per week. We
have to much resource to use the resource center...
Any help to put the resource capacity in my query?
SET DATEFIRST 1 ---- Affectations ----- SELECT MSP_EpmResource_UserView.RBS, MSP_EpmProject_UserView.[Directeur / VP projet], MSP_EpmResource_UserView.ResourceName, CONVERT(varchar,datepart(ww, TimeByDay))-1 as weekNumber, CONVERT(VARCHAR(20),DATEADD(dd, -(DATEPART(dw, TimeByDay)-1), TimeByDay),102) as firstDayOfWeek, MSP_EpmProject_UserView.ProjectName, MSP_EpmProject_UserView.[Code de Projet], MSP_EpmProject_UserView.[Statut de projet], MSP_EpmProject_UserView.[Priorité du projet], MSP_EpmTask.TaskName, SUM(MSP_EpmAssignmentByDay.AssignmentWork-MSP_EpmAssignmentByDay.AssignmentActualWork) AS [Remaining Work] FROM MSP_EpmAssignmentByDay INNER JOIN MSP_EpmProject_UserView ON MSP_EpmAssignmentByDay.ProjectUID = MSP_EpmProject_UserView.ProjectUID AND MSP_EpmProject_UserView.[Statut de projet] = 'En cours' INNER JOIN MSP_EpmAssignment_UserView ON MSP_EpmAssignmentByDay.TaskUID = MSP_EpmAssignment_UserView.TaskUID INNER JOIN MSP_EpmResource_UserView ON MSP_EpmAssignment_UserView.ResourceUID = MSP_EpmResource_UserView.ResourceUID AND MSP_EpmResource_UserView.ResourceIsGeneric = 0 AND RIGHT(MSP_EpmResource_UserView.RBS,3)='MBR' AND MSP_EpmResource_UserView.ResourceIsActive = 1 INNER JOIN MSP_EpmTask ON MSP_EpmTask.TaskUID = MSP_EpmAssignmentByDay.TaskUID WHERE MSP_EpmAssignmentByDay.TimeByDay < (GETDATE()+365) AND MSP_EpmAssignmentByDay.TimeByDay > (GETDATE()-14) --AND MSP_EpmProject_UserView.[Statut de projet] = 'En cours' GROUP BY MSP_EpmResource_UserView.RBS, MSP_EpmProject_UserView.ProjectName, MSP_EpmProject_UserView.[Statut de projet], MSP_EpmResource_UserView.ResourceName, MSP_EpmProject_UserView.[Code de Projet], MSP_EpmProject_UserView.[Priorité du projet], MSP_EpmProject_UserView.[Directeur / VP projet], MSP_EpmTask.TaskName, CONVERT(varchar,datepart(ww, TimeByDay)), CONVERT(VARCHAR(20),DATEADD(dd, -(DATEPART(dw, TimeByDay)-1), TimeByDay),102) ORDER BY MSP_EpmResource_UserView.RBS,MSP_EpmResource_UserView.ResourceName,CONVERT(varchar,datepart(ww, TimeByDay)),ProjectName
PWAdmin