Resource Usage

P

Patricio Fernandes

Hi,

I need to find how can i get resourse usage information in day by day basis.

"In the MSP_VIEW tables, there are time phased ones that show hours/$
per day there. In the MSP_ tables, timephased data is only visible if in
Project you select Expand time phased data under Tools, Options, Save tab.
However this information is hard to interpret and isn't accurate unless you
also integrate it with the calendar data. "

The 'real' data is stored in binary blobs.' !?

How can i integrate the information from MSP_VIEW tables with the calendar
data?

Thanks.
 
E

Ed Morrison

The procedure below will get the time phase data you need. I found this in
the PRSVRDB.HTM file that ships with Project Server. I'm not sure how you
want to integrate the data with the calendar or if this will do.

declare @res_name as nvarchar(510)
declare @begin_date as datetime
declare @end_date as datetime
declare @work_type as int
-- set these variables
select @res_name = 'Resource Name'
select @begin_date = '2003-01-01'
select @end_date = '2005-12-31'
select @work_type = 0 -- 0=scheduled, 1=actual, 2=overtime
-- end user variables
-- function variables
declare @assn_id as int
declare @td_start as datetime
declare @total_days as int
declare @td_value as decimal(25,6)
declare @td_cur_date as datetime
declare @p_name as nvarchar(510)
declare @t_name as nvarchar(510)
-- end function variables
-- create temporary table
create table #tp_data ( td_date datetime, td_hours decimal(25,9),
task_name nvarchar(510), proj_name nvarchar(510) )
-- create cursor for data collection
declare td cursor for
select
a.WASSN_ID,
WWORK_START,
datediff(day, WWORK_START, WWORK_FINISH)+1,
WWORK_VALUE
from
MSP_WEB_WORK w,
MSP_WEB_RESOURCES r,
MSP_WEB_ASSIGNMENTS a
where
a.WRES_ID = r.WRES_ID
and a.WASSN_ID = w.WASSN_ID
and r.RES_NAME = @res_name
and w.WWORK_TYPE = @work_type
and (@begin_date <= WWORK_FINISH or @end_date >= WWORK_START)
order by
WWORK_START
-- loop through cursor to explode timephased data
open td
fetch next from td into @assn_id, @td_start, @total_days, @td_value
while @@fetch_status <> -1
begin
select @td_cur_date = @td_start
while @total_days > 0
begin
-- get the task name
select @t_name =
( select TASK_NAME
from MSP_WEB_ASSIGNMENTS
where WASSN_ID = @assn_id )
-- get the project name
select @p_name =
( select PROJ_NAME
from MSP_WEB_PROJECTS p, MSP_WEB_ASSIGNMENTS a
where a.WASSN_ID = @assn_id and a.WPROJ_ID = p.WPROJ_ID )
-- insert the data row into the temp table
insert #tp_data values ( @td_cur_date, @td_value,
@t_name, @p_name )
select @td_cur_date = DATEADD(d, 1, @td_cur_date)
select @total_days = @total_days - 1
end
-- get next row from cursor
fetch next from td into @assn_id, @td_start, @total_days, @td_value
end
close td
deallocate td
-- display data from temporary table with grouping and rollup
select
proj_name as Project,
task_name as Task,
td_date as 'Date',
SUM(td_hours/60000) as 'Total_Work'
from
#tp_data
group by proj_name, task_name, td_date with rollup
-- clean up that temporary table
drop table #tp_data


--
Ed Morrison
msProjectExperts
"We wrote the books on Project Server"
http://www.msprojectexperts.com
FAQ - http://www.projectserverexperts.com
 
K

Krishna Alavala

Hi Ed

My MSP_WEB_WORK table doesn't have any rows? How to populate this table?

Patricio

I am fetching the timephased data by looping through all the projects, tasks
and their assignments. See the following code.

Krishna

If objSqlRecordset.RecordCount > 0 Then
objSqlRecordset.MoveFirst
Do While Not objSqlRecordset.EOF
intProjectID = objSqlRecordset.Fields("Proj_ID")
strProjectName = objSqlRecordset.Fields("Proj_Name")
strProjectDS = objSqlRecordset.Fields("Proj_Prop_Title")

FileOpen "<>\" & strProjectName, vbReadOnly

strProjectName = RemoveSpecialChar(strProjectName)
strProjectDS = RemoveSpecialChar(strProjectDS)

For Each objTask In ActiveProject.Tasks

sTaskName = RemoveSpecialChar(objTask.Name)
For Each objAssignment In objTask.Assignments
For iCount = 1 To lMonths
dHours = 0
sHours = objAssignment.TimeScaleData(StartDate:=dtTaskStartDate,
EndDate:=dtTaskEndDate, Type:=pjAssignmentTimescaledWork,
TimeScaleUnit:=pjTimescaleMonths).Item(iCount).Value
If sHours <> "" Then
dHours = Round(CDbl(sHours))
If dHours > 0 Then
dHours = Round(dHours / 60, 2)
End If
End If
sLogRecord = sLogRecord & dHours & CON_SAPERATOR
Next
sLogRecord = intProjectID & CON_SAPERATOR & strProjectName &
CON_SAPERATOR & sAPVProjectCode & CON_SAPERATOR & sCANProjectCode &
CON_SAPERATOR & strProjectDS & CON_SAPERATOR & sFinanceProjCode &
CON_SAPERATOR & sTaskName & CON_SAPERATOR & sGLWBS & CON_SAPERATOR & sWBS &
CON_SAPERATOR & sResourceName & CON_SAPERATOR & sResourceSite & CON_SAPERATOR
& sRWT & CON_SAPERATOR & sLogRecord
WriteToLogFile intFile, sLogRecord, ErrorMsgTypeCon.NoDate
DoEvents
sLogRecord = ""
Next
Next
FileClose pjDoNotSave
objSqlRecordset.MoveNext
Loop
End If
 
K

Krishna Alavala

All my projects have been published by a automated process (meaning I wrote a
macro to get projects from our oracle server to Project 2003) and I can see
them in Project Web access.
 
G

Gary L. Chefetz [MVP]

MSP_WEB_WORK contains timesheet data entered by team members through web
access. So, if you haven't collected actual work from resources and simply
publish all information, this has no affect on this table. To overwrite the
values contained in MSP_WEB_WORK with data contained in the project plan,
you must explicitly invoke the Overwrite Actual Work option as part of the
"Republish" action.

Note that in many cases, actual work values change when shuttled back and
forth between the project tables and MSP_WEB_WORK.
 
W

Wil

Ed:

Do you know any way to get the information store for a resource but
regarding to baseline work?

I have used the script you sent but I haven´t found information about
baseline.

Hope you can help me

Regards

"Ed Morrison" escribió:
 
E

Ed Morrison

Specifically, what do you need the baseline info for? Baseline is not meant
to be time phased like work.

Assignment baseline info is in the msp_assignments table and start with
assn_base_. Task baseline info is in the msp_tasks table and start with
task_base_. For more information, refer to the help documents that are on
the install disk and on the project server installation.

--
Ed Morrison
msProjectExperts
"We wrote the books on Project Server"
http://www.msprojectexperts.com
FAQ - http://www.projectserverexperts.com
 
W

Wil

I need the information of work per day per resource, but based on the
baseline, I'm trying to get the expected advance for a task base on the
information store in baseline and regarding to effort, the problem with the
assigment table is that i can't get information per day,



"Ed Morrison" escribió:
 
E

Ed Morrison

Baseline information can not be accurately timephased to give you baseline
work per day, since we do not know about leveling information. Generally we
do not care if a resource was baselined to work 4 hours on Monday but only
worked 3 hours. Our main concern is if the task is going to or did finish
on time compared to our original schedule.

Although I would re-evaluate your need for this level of baseline
information, you can do a few things:
1. Divide the work by the duration and get a estimate based on a flat work
contour for each assignment. Of course, you'll also have to take into
account the calendars.
2. Create a task for each day of the task. Since you want to compare the
original plan to the actual work for each day of each assignment, you are
tracking at this level. Therefore, the tasks should be at this level.
3. Create a new version in PWA. Instead of baselining the project plan,
save it to this version. Use the timephasing procedure against each version
and compare.

--
Ed Morrison
msProjectExperts
"We wrote the books on Project Server"
http://www.msprojectexperts.com
FAQ - http://www.projectserverexperts.com
 
J

Jan De Messemaeker

Hi,

Just for the sake of clarity, I don't know about the server data base, but
baseline work is definitely available as timescaled data in the Project
file.
HTH
 
W

Wil

That's exaclty what I mean.

What I need to get is the information of how many effort must be done for an
especific day in a task.

For example:

I have a task that starts on January 1st and finish on January 5th and I
store my baseline with these information

1st 2nd 3rd 4th 5th
Baseline 6 6 6 6 6
Work 8 8 8 8 8

The information that I try to get is, if I want to know how many effort must
be done based on the baseline at the 3rd day, for the example I should get 18
hours.

So, I need to make a query to get this information






"Jan De Messemaeker" escribió:
 
W

Wil

What I need to get is the information of how many effort must be done for an
especific day in a task.

For example:

I have a task that starts on January 1st and finish on January 5th and I
store my baseline with these information

1st 2nd 3rd 4th 5th
Baseline 6 6 6 6 6
Work 8 8 8 8 8

The information that I try to get is, if I want to know how many effort must
be done based on the baseline at the 3rd day, for the example I should get 18
hours.

So, I need to make a query to get this information







"Ed Morrison" escribió:
 
W

Wil

What I need to get is the information of how many effort must be done for an
especific day in a task.

For example:

I have a task that starts on January 1st and finish on January 5th and I
store my baseline with these information

1st 2nd 3rd 4th 5th
Baseline 6 6 6 6 6
Work 8 8 8 8 8

The information that I try to get is, if I want to know how many effort must
be done based on the baseline at the 3rd day, for the example I should get 18
hours.

So, I need to make a query to get this information







"Ed Morrison" escribió:
 
E

Ed Morrison

Wil,

As I mentioned in a previous post, you can take the baselines duration, take
the calendar into consideration by subtracting out non-working days and
divide the total work by this number. This gives you your 6 hours per day.
Or you can create another version of the project called .Baseline and
compare your plan to this version.

I am still weary about why you would want this information. If you baseline
the project at the beginning and one task slips by one day (or starts early
by one day), it throws off your entire results. If the task starts or
finishes early, it would show that work should have been performed and
wasn't! In my experiences, every plan changes from the baseline,
particularly start and finish dates. Wouldn't Earned Value Analysis provide
better information?

--
Ed Morrison
msProjectExperts
"We wrote the books on Project Server"
http://www.msprojectexperts.com
FAQ - http://www.projectserverexperts.com
 
J

Jan De Messemaeker

Hi,

I can help you if you want to calculate this through Project's VBA objects
on an mpp file, but I'm afraid I don't know much about data bases. It can be
calculated (and exported to another medium such as Excel) through Project
VBA.
Tell me if you're interested

HTH
 
W

Wil

Thanks Ed, I think that the example I sent wasn't very good, what happen If
the task has this information

6 5 4 6 6

As you must know the effort in most of the cases isn't the same day by day,
I agree with your opinion about the way I try to get this information, but I
realize that if I get the information based on the earned value in most of
the cases was very different beacause of the standard rates for each person.

This information would give me how many effort must be done at the day of
report, for example:

6 6 5 6

In the 3rd day must be 17 hours vs 23 hours to completion that means 73.91%
of advance excepted.

Regards.



"Ed Morrison" escribió:
 
W

Wil

That would be great!!

Beause I would take this information and put it in to an enterprise field
and process the information that I want.

My email is (e-mail address removed) or (e-mail address removed)

I would appreciate this information.

Regards



"Jan De Messemaeker" escribió:
 
E

Ed Morrison

You should use my second option of creating a new version called .Baseline.
You can then run the stored procedure that I listed in a previous post
against both the .Published and the .Baseline version. Create a report to
compare the two. It is relatively easy.

I am curious to see Jan's timephasing of the baseline information. That may
be a better fit for you.

--
Ed Morrison
msProjectExperts
"We wrote the books on Project Server"
http://www.msprojectexperts.com
FAQ - http://www.projectserverexperts.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top