The onDate() function returns a value into the time period corresponding to its date argument.
It can be included inside other expressions to isolate the value to be retrieved for the expression. On its own in a metric expression, it will assign the retrieved value to the single time period corresponding to the date argument in the function.
Syntax
onDate(value, date)
Argument | Description |
value
(required) |
An expression. This can be a constant (i.e., a hard-coded value or a reference to an attribute) or a more complex expression.
If the expression returns a time-series array, the only value from the array that is used in this function is the value in the time period that corresponds to the date argument. |
date
(required) |
The date that determines to which metric time period the value should be applied. |
Where Available
- Metric expression
Examples
Where | Example(s) |
Metric expression | sumif(Initiative__t,onDate(Total_Savings__c,Achieved_Date__c),Stage__c="3" and Enabler__c="Technology")
sums the Total Savings from Initiatives at Stage 3 with a Technology Enabler but only populates the results into the metric time period that corresponds to the Achieved Date
retrieves the value of the CAPEX metric for the time period that corresponds to the Stage 3 Date and assigns it to the metric time period that corresponds to the Stage 3 Date |