#ProjectOnline / #ProjectServer reporting on auto / manually scheduled tasks #BI #Office365 #Excel #PowerQuery #PS2013
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
One issue or query that has been raised a few times is that when reporting on manually scheduled tasks and auto scheduled tasks the Start / Finish date fields do not show the same data that they do in Project or PWA for the manually scheduled tasks. For example, take a look at the example project plan below:
If I generate a reporting for this project using the equivalent fields from the OData API, see below:
As you can see all tasks have start and finish dates. The Manually scheduled tasks that are either blank or have text displayed in Project Pro contain dates in the report. These default to the Project Start date. The OData query used is below:
Tasks()?$Select=ProjectName,TaskName,TaskStartDate,TaskFinishDate,TaskIndex
This can be quite misleading from a reporting point of view. There are two options (probably more but two documented here!), these are detailed below in order of preference:
Option 1:
The preferred option would be to create a calculated field in the report, in this example, as I am using Excel I will create this in Power Query. I have my dataset in the Power Query Editor like below:
The OData query used is below:
Tasks()?$Select=ProjectName,TaskName,TaskStartDate,TaskStartDateString,TaskFinishDate,TaskFinishDateString,TaskIsManuallyScheduled,TaskIndex
Now click Add Column > Add Custom Column:
Give the column a name then create the formula:
Click OK to add the new custom column, repeat for the finish date:
After re-ordering and removing some columns my dataset now looks like this in the Query Editor:
The final change is to update the Data Types of the columns, in this example I updated the TaskStartDate and TaskFinishDate columns to Date/Time and my calculated DisplayedStartDate and DisplayedFinishDate columns to Text:
Now I am happy with the query I click the Close & Load button on the Home tab:
This will load my data into Excel:
As you can see the data displayed in my calculated columns on my report match the data in the fields on my Project Plan:
Option 2:
The other option is to create new Enterprise Custom Fields in Project Online that are calculated. Using Start date as an example, create a task level text field that is based on formula, the formula would be =[Start]. I have called the field “DisplayedStartDate”. In Project Pro:
In my updated Excel Report:
The OData query used is below:
Tasks()?$Select=ProjectName,TaskName,TaskStartDate,TaskFinishDate,DisplayedStartDate,TaskIndex
As you can see this also gives the correct data but does introduce two additional calculated task level fields in your Project Online configuration. It is recommended to keep the task level calculated fields to a minimum – ideally below 5 for performance reasons hence this option being the least preferred.