Automatic Colour Changes on the Gantt Chart
It is often useful to highlight tasks that meet particular user-defined conditions by means of Gantt bars whose color automatically
It is often useful to employ Gantt bars whose colour can automatically reflect whether or not corresponding tasks meet certain user-defined conditions. For example, we may want to highlight tasks
• that are more than 75% complete;
• whose durations are greater than 10 days;
• whose actual work hours are more than half of the baseline value;
• whose cost has exceeded its budget by 10%
There are two steps required to make this happen and both are easy to implement:
First, we need to express the condition that determines whether or not the colour should change. This condition is like a filter but is actually represented as a formula in a customised flag field. You may be familiar with customized text and number fields, (text1, number1, etc ) which are provided to contain arbitrary character-based or numerical data respectively. There are also flag fields (flag1, flag2 etc) which are designed to contain binary values of ‘yes' (true) or ‘no (‘false'). You can either enter appropriate data in these fields manually or have a formula calculate them.
Second, we need to inform Microsoft Project that Gantt bars should have a certain colour if the corresponding flag1 (say) field contains or computes to a ‘yes'.
Let us do it. First we attend to the formula in the flag field.
Suppose we want to show tasks whose percent complete value is greater than 75%. Add the ‘% Complete' column to the current task table so that we can test our results. Use the ‘Insert – Column' menu option and select the very first field name in the offered list.
Also add the flag1 field. It will appear with default ‘No' values.
Now right-click the column header of this field and select ‘Customize fields'. Alternatively, place the cursor in this column and use the menu sequence ‘Tools – Customize – Fields'.
The cursor will automatically be placed on the name of the field (flag1) you selected when starting this ‘customize' operation. Now click the ‘Formula' button that sits below. In the space provided, enter the following conditional formula:
[% Complete]>75
Notice that fields in Microsoft Project are always contained within square brackets. Formula can be placed in customized Number or Cost fields to hold values such as GST. For example, in the Cost1 field we could have a formula appearing as
[Cost] * 1.1
We will tackle formula in more detail in future articles. For the present we have seen how to create a conditional formula which is one that computes to a ‘true' or ‘false'. This must be entered in a customized flag type field designed for just such values.
When you return to the main table, enter some values above 75% in the ‘Percent Complete' field we added earlier. A ‘Yes' should appear in the flag1 column for these tasks.
Now we shall attend to the change of colour.
Choose the ‘Format – Bar Styles' menu combination (or simply double-click an unoccupied part of the Gantt chart).
In the ‘Bar Styles' dialog box, put your cursor in the first or second row and use the ‘Insert Row' button. In the ‘Name' field enter something like ‘Flag' or ‘Flag value'. Place your cursor in the ‘Appearance' cell for this row and in the lower half of the dialog box select a distinctive colour, shape and pattern combination. In the ‘Show for …'field, enter or select the field name ‘Flag 1'. Click OK.
You are done!. The tasks containing a ‘Yes' in the ‘Flag1' field (resulting from a higher than 75% percent complete value) should show up with the colour pattern combination you selected.
To remove this effect, return to the Bar Style area, place your cursor on the row you added and click the ‘Cut Row' button.
You now have a simple, quick and impressive tool for your next project plan presentation!
Now try other conditions. Here are the formula corresponding to the examples we discussed at the start of this article.
[Duration]>480*10
[Actual Work]/[Baseline Work]>0.5
[Actual Cost]/[Baseline Cost]>1.1
Note: In the first example, we need the 480 because Microsoft Project expresses durations in minutes and there are 480 of these in a typical eight hour day.
|