Calculating priority automatically
You can configure

Each expression must include the name of a field and a pair of values that define the range of low, medium and high. The field name and the values must be separated by a # character. You can use any field that returns a type of answer for which it makes sense to compare values, ie dates, currency amounts, durations and numbers. You can also use strings, which get compared in dictionary order.
Examples of expressions
You could define an object's priority by its start date, using the Start field and two dates. With the expression start#25/7/19#31/8/19
- Objects with a start date on or before 25/7/19 have a low priority.
- Objects with a start date later than 25/7/19 and on or before 31/8/19 have a medium priority.
- Objects with a start date later than 31/8/19 have a high priority.
You could define an object's priority by its cost, using the Cost field and two amounts. With the expression cost#£10#£20
- Objects with a cost less than or equal to £10 have a low priority.
- Objects with a cost greater than £10 and less than or equal to £20 have a medium priority.
- Objects with a cost greater than £20 have a high priority.
You could define an object's priority by its duration or effort, using the Duration or Effort field and two durations. With the expression duration#20d#30d
- Objects with a duration less than or equal to 20 days have a low priority.
- Objects with a duration greater than 20 days and less than or equal to 30 days have a medium priority.
- Objects with a duration greater than 30 days have a high priority.
If you include only one value in an expression, only the low and high priorities are assigned: with the expression logical precedence#50
- Objects with a logical precedence less than or equal to 50 have a low priority.
- Objects with a logical precedence greater than 50 have a high priority.
You could calculate the priority of objects according to their variance to a baseline, by selecting the baseline against which you want to compare project information in the Data field and entering an expression using a variance field. With the expression finish variance#3d#6d
- Objects with a finish date variance less than or equal to 3 days have a low priority.
- Objects with a finish date variance greater than 3 days and less than or equal to 6 days have a medium priority.
- Objects with a finish date variance greater than 6 days have a high priority.
Note that the Start variance and Finish variance fields can display both positive and negative values (what is signified by a positive and a negative value is determined by whether or not you have selected the Version 5 variance signing check box on the General tab of the Options dialog). You can specify both positive and negative values in expressions when using either of these fields - the expression finish variance#-3d#-6d would be valid too.
You can fine-tune the data that is used to define the priority of bars, tasks and allocations by including parameters in the expression that you enter into the Indirection field. For example, if you are using the Cost field to define an object's priority by its cost, you could include parameters in your expression to specify that the cost from a specific cost centre should be used to calculate priority, or that the cost between a range of dates should be used. Such an expression would look like this:
cost(1031, 1, 0, 2454683, 0, 2454701, 86399)#£10#£20
The parameters - which must be placed in parentheses directly after the name of the field in the expression - differ for each field. For this reason, it is difficult to construct an expression using parameters by typing the expression directly into the Indirection field. However, there is a simple way to construct an expression using parameters:
- Create a text annotation.
- Insert the field that you want to use in your expression into the text annotation. The Object Chooser dialog appears.
- Use the fields in this dialog to limit the field to specific data as required. For example, you may want to limit the Cost field to a specific cost centre.
- Click OK to close the Object Chooser dialog. The field is inserted into the text annotation, followed by a number of parameters in parentheses.
- Copy the parameters to the Clipboard.
- Access the Table Definition Properties dialog and when constructing your priority expression, paste the parameters from the Clipboard directly into the Indirection field.
Once you have done this, you can delete the text annotation from the project.
Calculating the priority of tasks in this way does not update the Priority field on the Bar and Task Properties or Allocation Properties dialogs, as you are defining precisely how to calculate priority, and can set up more than one priority indicator in the spreadsheet, each one defining priority in a different way.
To calculate the priority of bars, tasks and allocations automatically:
- Display the priority indicator in the spreadsheet.
- Right-click the column heading of the priority indicator, then select Table Definition. The Table Definition Properties dialog appears.
- Locate the Priority field in the Field field. This row relates to the priority indicator.
- Enter an expression that defines the way in which you want bar or task priority to be calculated in the Indirection field (see above for details of how to construct an expression). Enter an expression in the second priority field row to define the way in which you want allocation priority to be calculated.
- Close the Table Definition Properties dialog once you have finished editing the current spreadsheet.
Note that you can also construct formulae that use the If and Switch functions to display priority indicators based on a variety of criteria.
Assigning a priority to bars, tasks and allocations
Defining the priority indicator appearance