Automation Rate, Simple Ratio formula is as follows:
KPI("Ratio", "_CEL_AP_ACTIVITIES"."USER_TYPE" = 'B') -- result: 64.07%
We are trying to replicate the same simple ratio with a standalone query instead of visual editor to understand the mechanism of the Simple Ratio. We have tried two formulas and both of them gave us different answers.
Using PU_COUNT
SUM(PU_COUNT("BSEG" , "_CEL_AP_ACTIVITIES"."USER_TYPE" , "_CEL_AP_ACTIVITIES"."USER_TYPE" = 'B')) / SUM(PU_COUNT("BSEG" , "_CEL_AP_ACTIVITIES"."USER_TYPE")) -- result: 65.45%
Using CASE WHEN statement
AVG(CASE WHEN "_CEL_AP_ACTIVITIES"."USER_TYPE" = 'B' THEN 1.0 ELSE 0.0 END) -- result: 65.51%
As it can be seen from above, that each query gave us different results and we were not able to replicate the Simple ratio as well. What is the actual backend formula used for Simple Ratio? Any help would be very appreciated. Thank you in advance!!