Touchless Sales Order Item count

Hi Team,

I am trying to calculate the touchless order where have defined in dimension
1)COUNT_TABLE(“VBAP”)
in KPI section have defined SUM(CASE
WHEN (PU_COUNT(“VBAP”,"_CEL_O2C_ACTIVITIES".“USER_TYPE”,"_CEL_O2C_ACTIVITIES".“USER_TYPE” IN (<%= AutoTypes %>)
AND “_CEL_O2C_ACTIVITIES”.“ACTIVITY_EN” IN (<%=AutomationActivities%>))
= PU_COUNT(“VBAP”,"_CEL_O2C_ACTIVITIES".“USER_TYPE”, “_CEL_O2C_ACTIVITIES”.“ACTIVITY_EN” IN (<%=AutomationActivities%>)))
THEN 1.0
ELSE 0.0

where AutomationActivities and AutoTypes defined in varibale
AutoTypes has only ‘A’ which is manual so ideally i want count of records which are manually done and will be calculating touchless based upon the below logic
total number of SO item-(KPI logic- count of manual orders)

But am not able to get the count , could you please check and help me on the same.