#ProjectOnline #Excel #PowerQuery Report #Office365 #PS2013 #BI #OData

January 20, 2015 at 1:21 pm | Posted in Administration, Configuration, Customisation, Functionality, Information, Reporting | 3 Comments
Tags: , , , , , ,

Something I have been meaning to blog about for a while now is Power Query. There is nothing revolutionary in this post but hopefully it will give the readers some idea of how powerful Excel Power Query can be if they have not seen / used it before. We will only touch the surface here in this post but there is plenty of information available already.

So firstly, what is Power Query. In short, Power Query is an add in for Excel that enables you to work with many different data sources and transform that data as required. An intro can be seen here. Power Query is formula based but this is different formula syntax to what you use in Excel. The Power Query formulas are based on what was known a “M” language, an intro to the formulas can be found here.

Now we will look at creating a simple Excel Power Query report for Project Online using the OData API. The first report we will create will be a simple report that allows you to dynamically filter the data based on a text value in a cell. The dynamic filtering is useful when you are looking at large amounts of data such as time phased assignments in Project Online. The example we create below doesn’t really benefit from the dynamic filtering as the data set is small but this is only an example to show you how this works.

Get your Project ODATA url, for this example and am using the following:

https://<URL TENANT>/sites/pwa/_api/ProjectData/Projects()?$select=ProjectName,ProjectOwnerName,ProjectWork,ProjectCost,ProjectDuration,ProjectPercentCompleted,ProjectDescription,EnterpriseProjectTypeName

Launch Excel and click the Power Query tab then From Other Sources > From OData feed:

image

Paste in the URL:

image

Click OK. You will then be presented with an authentication window. Select “Organizational account” from the left hand side navigation and click Sign In. In the new window that appears enter the credentials for an account that has access to the ProjectData API.

Once authenticated you will see the Power Query Preview window load with the data:

image

You can see the formula used in the formula bar:

image

If you can’t see the formula bar, click the View tab and check the Formula bar check box:

image

We now have our Project Online data in Power Query ready to be used as a data source. In this example I have already selected the columns I wanted, but if you just used the Projects feed with no select (..pwa/_api/ProjectData/Projects()) you would see all of the columns displayed. At that point you can then easily chose which columns you would like in your data source by selecting the columns you don’t need then right click and chose Remove Columns.

image

Then you can see those columns have been removed. The formula bar has been updated with the latest steps:

image

You will also see another step appear in the applied steps, see it has the “Removed Columns” step:

image

At any point in time you can switch back to a previous step or even delete a step. If I click back on the source step I see the original data set with the two columns I deleted:

image

For the purpose of this post I will delete the “Removed Columns” step but before I do I want to show the Advanced Editor screen. This is available from the View tab:

image

This editor enables you to type the query yourself rather than using the UI menus. Some things you might want to do might not be possible from the UI and you are required to type / update the query. I will now delete the “Removed Columns” steps and you can see the query has been updated:

image

I can manually update the query update the data set, for example I can manually update the query to remove columns:

image

You will then see the data update and an applied step appear:

image

Now I am happy with my simple data set, but before I do anything I will update the query name to “Projects”:

image

Now chose “Close & Load To…” from the Home tab:

image

Then chose “Only create the connection” also check the check box to load the data to the data model:

image

You will then see the Excel sheet with the Workbook Queries window that allows you to preview the data:

image

Before we create the Excel report, I want be able to filter the data based on the Project Owner. Next insert a table like below:

image

Enter any Project Owner name for now, I used he MOD Administrator in this example as that user is the Project Owner for a few projects. Give the table a name, in this example I called it ProjectOwnerTable.

Now click the Power Query tab then “From Table”:

image

The Power Query editor will load with the following:

image

Switch to the advanced editor to see the query:

image

Update the query to change the type and select the record:

image

The record will then be displayed:

image

Now click the “Close & Load To…” from the Home tab and chose the “Only create connection” and check the check box to add the data to the data model.

Now load the first Projects query that was created in Power Query and switch to the advanced editor:

image

This needs to be modified to filter for the Project Owner in the new table that was created. See the updated query below:

image

You will need to enable the data in privacy option:

image

image

Click Close and load to save the changes in the Power Query editor and you will see the Excel worksheet:

image

Now you can create the Excel report, for this I will add a Pivot Table using an External Data source then selecting my data model:

image

Then update the pivot table with the fields:

image

Change the layout etc.

image

image

This is filtered to the projects where the owner is MOD Administrator, if I want to see other projects, update the Project Owner on row 2 and refresh the data:

image

image

A very quick and simple intro the Power Query for Excel with Project Online data using the ProjectData Odata API.

I hope to give more examples in the future.

#HappyNewYear everyone! 2014 #blog review / highlights #ProjectServer #ProjectOnline #Office365

January 1, 2015 at 12:52 pm | Posted in Information | 2 Comments
Tags: , , , , , , ,

Firstly Happy New Year to all, I think by now we are all in 2015! I hope that 2015 is a great year for all.

A quick review of my blog for 2014 can be seen below.

The blog was viewed around 90,000 times in 2014 with 618 views being the highest for 1 day with the most popular post that day being the Project Online Reporting Pack post.

The top five most visited posts in 2014 were as follows:

  1. https://pwmather.wordpress.com/2013/05/02/projectserver-2013-environment-migration-rollover-steps-powershell-ps2013-msproject-sp2013/
  2. https://pwmather.wordpress.com/2014/01/15/ssrs-native-report-render-issue-in-sharepoint-sp2013-with-ie-9-or-later-ps2013-bi-sql/
  3. https://pwmather.wordpress.com/2012/06/28/move-a-sharepoint-2010-sub-site-to-a-different-location-on-the-same-farm-sp2010-ps2010-powershell/
  4. https://pwmather.wordpress.com/2014/09/05/microsoft-projectonline-reporting-pack-msproject-sharepointonline-office365-ppm-excel-bi-data/
  5. https://pwmather.wordpress.com/2013/04/24/projectserver-2013-linking-list-items-to-tasks-and-other-list-items-ps2013-sp2013/

I look forward to creating more Project / Project Online / Project Server related posts in 2015!

Don’t forget the biggest event in 2015 – Microsoft Ignite, May 4th – 8th 2015 in Chicago – it will be an awesome event – I can’t wait to be there!

Blog at WordPress.com.
Entries and comments feeds.