Skip to main content
Hello all,
I try to find out, how to best measure fully automated vendor invoice management documents (can also be any other document head). I found a way to measure measure documents, that contain at least one manuel user interaction:
COUNT(DISTINCT
CASE WHEN
CASE WHEN
"_CEL_VIM_ACTIVITIES"."USER_TYPE" IN ( <%=manual_user_type%> )
AND "_CEL_VIM_ACTIVITIES".ACTIVITY_<%=language%> NOT IN (<%=whitelist%>)
THEN 1 ELSE 0 END
= 1
AND MATCH_ACTIVITIES("_CEL_VIM_ACTIVITIES"."ACTIVITY_DE", NODE['Gleiche Rechnung aus (VIM)']) = 1
THEN
"/OPT/VIM_1HEAD"."DOCID"
ELSE '' END
)

This works as single kpi and on a line chart. When I try to apply a somewhat similar logic for automated documents, I get the expected results as single KPI, but in the timeline I get like twice the documents.
COUNT(DISTINCT
CASE WHEN
MATCH_ACTIVITIES("_CEL_VIM_ACTIVITIES"."ACTIVITY_DE", NODE['Gleiche Rechnung aus (VIM)']) = 1
THEN
"/OPT/VIM_1HEAD"."DOCID"
ELSE '' END
)
-
COUNT(DISTINCT
CASE WHEN
CASE WHEN
"_CEL_VIM_ACTIVITIES"."USER_TYPE" IN ( <%=manual_user_type%> )
AND "_CEL_VIM_ACTIVITIES".ACTIVITY_<%=language%> NOT IN (<%=whitelist%>)
THEN 1 ELSE 0 END
= 1
AND MATCH_ACTIVITIES("_CEL_VIM_ACTIVITIES"."ACTIVITY_DE", NODE['Gleiche Rechnung aus (VIM)']) = 1
THEN
"/OPT/VIM_1HEAD"."DOCID"
ELSE '' END
)

According to reality, one line should be at around 0 level.

Do you understand my issue and have an idea on what I do wrong here? If you want to help me with some formula, which I really would appreciate, please be aware that we use Celonis On-Premise and the latest stuff might not be implemented yet.
Best Regards
Patrick

Hi Patrick,

 

This is an odd behavior. It could be caused by misleading CASE WHEN / ELSE results.

 

Celonis has just released a more adherent CASE WHEN logic (similar to SQL) to handle the NULLs

 

"When using an ELSE fallback condition, so far the rows evaluating to NULL would be returned as NULL even if the ELSE statement was correctly defined. Example, when <COLUMN> = ‘A’ evaluates to NULL, then the following statement

 

CASE 

   WHEN <COLUMN> = ‘A’ THEN ‘option A’ 

ELSE ‘other’ 

END 

 

returns NULL instead of ‘other’. This counterintuitive behavior will change: CASE WHEN will return ‘other’ with NULL inputs. This will lead to less NULL results and more ELSE results if NULL values are input values, and if ELSE is being used. If no ELSE is defined or if ELSE NULL is used, the result will still be NULL and nothing will change.  "

 

Unfortunately, this is only available in the EMS (Cloud version) and not on the Onprem as you mentioned


Great to hear you've adjusted the behavior. While not 100% technological logically, it is more of a user expected behavior.

 

thank you for informing me !


Reply