Dear all,
I would like to create an OLAP table with the activity as dimension. And I would like the following KPI as a column:
If all activities with the name of the activity in the dimension ran automatically for a sales order item, then count 1, otherwise count 0.
For example:
So if the activity “Change Price” occurs 3 times for an order item, and all price changes are delivered automatically, then count 1.
But if at least 1 price change was manual, count 0.
The following code does not work unfortunately. I suspect that is because the dimension is on activity level, and the calculation on item level.
SUM(CASE
WHEN
PU_COUNT(“VBAP”, “_CEL_O2C_ACTIVITIES”.“USER_TYPE”, “_CEL_O2C_ACTIVITIES”.“USER_TYPE” NOT IN (<%=AutoTypes%>)) = 0
AND
PU_COUNT(“VBAP”, “_CEL_O2C_ACTIVITIES”.“USER_TYPE”, “_CEL_O2C_ACTIVITIES”.“USER_TYPE” IN (<%=AutoTypes%>)) > 0
THEN 1
ELSE NULL
END)
But is there any way to calculate this?
Many thanks in advance!
Best regards,
Jonas