So I have 2 measures: Measure1 (Forecast) and Measure2 (Commit) that varies over time. Now I have calculated the mismatch Forecast-Commit and set the severity of the exception to be EXCEPTION_LOW, EXCEPTION_MED, EXCEPTION_HIGH based on % variance. These booleans are set to 1 if it meets an exception condition.
For a given record (combination of Item-Site-Datetimestamp only 1 record will exist) either 1 of the above severity gets set.
For a given item-site combination there can be multiple records each with a different datetimestamp and each such record can have one severity
So for a given item-site combination, I am trying to find the DATETIMESTAMP where the first exception has occurred (irrespective of the severity)
See example below (in this i want to get 04-01-2013 as my FIRSTPROBLEMDATE)
Item | Site | DATETIMESTAMP | LOW | MEDIUM | HIGH |
---|---|---|---|---|---|
Item A | Site1 | 04-01-2013 | 1 | ||
Item A | Site1 | 04-02-2013 | 1 | ||
Item A | Site1 | 04-03-2013 | 1 |
So in my graphical calc view, I defined a calculated attribute (type varchar) and defined an expression like this. It evaluates as a valid expression.
if("EXCEPTION_LOW" =1 OR "EXCEPTION_MED" =1 OR "EXCEPTION_HIGH" =1, MIN("DATETIMESTAMP"),NULL)
However on validation, I get this error.Any pointers greatly appreciated.
Thanks,
Sudarshan.
- Activation Id:1983
- Repository: Activation failed for at least one object;At least one runtime reported an error during activation. Please see CheckResults for details
- Activation is performed with activation mode cascade two-phases.
- Internal deployment of object failed;Repository : Encountered an error in repository runtime extension;Internal Error:Create Scenario: failed aCalcEngine.createScenario(): The following errors occured: Inconsistent calculation model (34011)nDetails (Errors):n- CalculationNode (finalProjection) ->
attributes ->
calculatedAttribute (FIRST_PROBLEM_DATE) ->
expression: Expression is not valid: Attribute engine function not implemented;TK_STRING_FUNCTION<VALUE_CLASS_STRING>
(TK_IF_FUNCTION[here]<VALUE_CLASS_LONGDATE>
(TK_OR<VALUE_CLASS_INT>
(TK_OR<VALUE_CLASS_INT>
(TK_EQ<VALUE_CLASS_INT>
(TK_ID<"EXCEPTION_LOW", VALUE_CLASS_INT, at 92>
, TK_CONSTANT<"1", VALUE_CLASS_INT>
), TK_EQ<VALUE_CLASS_INT>
(TK_ID<"EXCEPTION_MED", VALUE_CLASS_INT, at 96>
, TK_CONSTANT<"1", VALUE_CLASS_INT>
)), TK_EQ<VALUE_CLASS_INT>
(TK_ID<"EXCEPTION_HIGH", VALUE_CLASS_INT, at 88>
, TK_CONSTANT<"1", VALUE_CLASS_INT>
)), TK_ID<"DATETIMESTAMP", VALUE_CLASS_LONGDATE, at 80>
, TK_NULL_FUNCTION<VALUE_CLASS_INT>
- Repository: Activation failed for at least one object;At least one runtime reported an error during activation. Please see CheckResults for details