Hello everyone,
I'm trying to count the number of materials per purchasing group that have been active in e.g. the year of 2023:
PU_COUNT_DISTINCT("T024", BIND ("_CEL_P2P_ACTIVITIES", "MARC"."MATNR"),
"_CEL_P2P_ACTIVITIES"."ACTIVITY_EN"='Create Purchase Order Item' AND
YEAR("_CEL_P2P_ACTIVITIES"."EVENTTIME")=2023))
I want the aggregation to be made per purchasing group (T024). MARC provides the information which purchasing group is responsible for each material number. I need _CEL_P2P_ACTIVITIES table to filter the eventtime within my view. This aggregation works, however, when wanting to build an average (per purchasing group) like this, it does not work - error: "The aggregation function COUNT cannot be used together with a dimension function input. Please check that there are no aggregations and dimensions used together as function inputs":
PU_COUNT_DISTINCT("T024", BIND ("_CEL_P2P_ACTIVITIES", "MARC"."MATNR"),
"_CEL_P2P_ACTIVITIES"."ACTIVITY_EN"='Create Purchase Order Item' AND
YEAR("_CEL_P2P_ACTIVITIES"."EVENTTIME")=2023))
/ COUNT(DISTINCT "EKKO"."EKGRP" (distinct purchasing groups that were actively purchasing)
Also what I have noticed is that the KPI only will be filtered when incorporating the 'AND
YEAR("_CEL_P2P_ACTIVITIES"."EVENTTIME")=2023)' within the KPI. If not and filtering for the year 2023 within the view the number does not change.
Does anyone have experience on this?
Thank you so much!
Best regards
Julia Bauer