DAX code to track project progress as at reporting date

masterelaichi

New Member
Joined
Sep 29, 2014
Messages
49
Hi all,

First up, I have posted this query on another forum https://powerpivotforum.com.au/viewtopic.php?f=6&t=1305

I am working on a dashboard that can track all the projects that are currently being undertaken. The aim is to report on the progress of the various projects over a period of time. The data is being sourced from monthly excel files that are filled in manually (which is a major pain point as it is!). Over time, projects status change. For example, if in the August 2018 report a project is closed, it is not reported in the September 2018. Kind of like an inventory of items

I'll try and explain the dataset if it helps. There are numerous columns that contain various project parameters such Project Status, which is RED, AMBER, and GREEN; Project Stages, delivery, initiaite, close, etc; Project Assurance Levels, amongst others. The data structure is further complicated by additional four funding columns- Financial Year1, Year2, Year3, Year4 funding. Due to this structure, I have to unpivot the funding year columns because of which there are 4 additional rows for each and every single project. Multiplying that with the different reporting cycles just makes the report extremely vast, with repeated information for other static columns

I have managed to figure out how to obtain all the projects being reported in a specific reporting period using the following code (if there is a better way to do it, I would appreciate that)

Total number of Initiatives =
CALCULATE (
DISTINCTCOUNT ( Project[Project ID] ),
FILTER ( 'Calendar', 'Calendar'[Date] = MAX ( Project[Report As At] ) )


The formula I have used to calculate the actual cost to date is

Cost to date Using SUMMARIZE and SUMX =

CALCULATE(
SUMX(
SUMMARIZE(Project,Project[Project ID],Project[Cost to date]),Project[Cost to date]),
FILTER( Project,Project[Report As At]=MAX(Project[Report As At])
))


Again, if there is a better way of doing it, do let me know. There are other expenditure columns such a original expenditure, revised expenditure, etc, that are not shown here. The actual cost to date is what changes every month as the project progresses

Looking at the image below, I am able to get the correct number of projects being reported in a reporting period, 3 in this case as there are 3 projects being reported in the September report. But, the doughnut chart shows 4 projects. According to the table visual, the red project is Project Name 3, which was reported in 31/08/2018

<dl class="file"><dt class="attach-image">
file.php
</dt><dd>Summary-all projects</dd><dd>1.Project Dashboard Test.JPG (115.17 KiB) Viewed 32 times</dd></dl>



But in the latest reports, it progressed to Amber. Hopefully, the image below will provide more clarification. Selecting Project 3 should have changed to visual to show only AMBER as the status and Initiate as the project stage


<dl class="file"><dt class="attach-image">
file.php
</dt><dd>Project 3 filtered- showing different categories in visual</dd><dd>2.Project Dashboard Test.JPG (93.85 KiB) Viewed 32 times</dd></dl>



How do I go about showing the correct number for a reporting period. Do note that there are other columns in the actual dataset that are usually static but can possibly change as well. But the ones that change the most frequently are Project Status, Stage,Project Explanatory notes (not shown in this example)

Report As AtProject IDProject Name
Project-ID1Project Name 1DeliveryGreen
Project-ID2Project Name 2ClosedGreen
Project-ID3Project Name 3InitiateAmber
Project-ID1Project Name 1DeliveryAmber
Project-ID2Project Name 2InitiateGreen
Project-ID3Project Name 3PausedRed
Project-ID4Project Name 4ClosedGreen

<tbody>
[TD="width: 137"]Project Stage[/TD]
[TD="width: 178"]Finances as At[/TD]
[TD="width: 134"]Cost to date[/TD]
[TD="width: 161"]Status[/TD]
[TD="width: 126"]Funding Year1[/TD]
[TD="width: 145"]Funding Year 2[/TD]
[TD="width: 102"]Funding Year 3[/TD]
[TD="width: 156"]Funding Year 4[/TD]

[TD="class: xl65, align: right"]30/09/2018[/TD]

[TD="class: xl65"][/TD]
[TD="align: right"]100000[/TD]

[TD="align: right"]10000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="class: xl65, align: right"]30/09/2018[/TD]

[TD="align: right"]150000[/TD]

[TD="align: right"]25000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="class: xl65, align: right"]30/09/2018[/TD]

[TD="align: right"]200000[/TD]

[TD="align: right"]30000[/TD]
[TD="align: right"]35000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="class: xl65, align: right"]31/08/2018[/TD]

[TD="align: right"]75000[/TD]

[TD="align: right"]10000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="class: xl65, align: right"]31/08/2018[/TD]

[TD="align: right"]120000[/TD]

[TD="align: right"]25000[/TD]
[TD="align: right"]25000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="class: xl65, align: right"]31/08/2018[/TD]

[TD="align: right"]70000[/TD]

[TD="align: right"]30000[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="class: xl65, align: right"]31/08/2018[/TD]

[TD="align: right"]5000[/TD]

[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

[TD="align: right"]0[/TD]

</tbody>



Hope, I have provided sufficient information. Any help will be appreciated. I was not able to upload attachments so I have pasted the excel dataset here

Thank you
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,224,816
Messages
6,181,143
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top