Reference → Data Service Macros → Object Macros → PES_MACRO_REMAINING_RESOURCE_CAPACITY_FROM_ALLOCATION
PES_MACRO_REMAINING_RESOURCE_CAPACITY_FROM_ALLOCATION shows remaining allocation capacity per resource for the requested timescale and storage unit. The output value of this macro is calculated as [capacity - allocation].
The parameters for this macro are:
- Temporary table name
- Storage unit; the possible values are ‘FTE’, ‘Currency’, ‘Hours’, ‘Units’. (Note: only attributes that are coercible to this storage unit are returned.)
- Time scale; the possible values are ‘Calendar Year’, ‘Calendar Quarter’, ‘Calendar Month’, ‘Calendar Week’, ‘Calendar Day’, ‘Fiscal Year’ and ‘Fiscal Quarter’
- Start date; the entire bucket containing the start date will be included. For example, if 1/16/2006 is specified and Calendar Month is requested then the entire month of January is returned
- Finish date; similar to Start Date the entire bucket containing this date will be included
- Use date format; the possible values are true and false. If true then the column names for the buckets will be yXXXX_mXX_dXX. If false then the column names for the buckets will be PX
The following example shows a call to get remaining resource capacity for allocations (in hours) for the Actual dimension between May 17, 2008 and May 17, 2009
SELECT * FROM PES_MACRO_REMAINING_RESOURCE_CAPACITY_FROM_ALLOCATION(tmp, , Hours,
Calendar Month, 2008-03-17, 2009-03-17, 1)
Copyright © 2003–2010 Serena Software, Inc. All rights reserved.