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.
|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.
|The date that determines to which metric time period the value should be applied.
- 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