Trying to create a KPI for my column chart, where I would count only those cases for which a specific condition is met.
In particular, I want to count the number of SO Items (COUNT_TABLE(“VBAP”)), which were created via EDI (“VBAK”.“BSARK” = ‘DFUE’).
Tried this statement, but getting an error:
CASE WHEN “VBAK”.“BSARK” = ‘DFUE’ THEN COUNT_TABLE(“VBAP”) ELSE NULL END
Dimension is ROUND_MONTH(“VBAK”.“ERDAT”) if that makes the difference.
UPDATE: in addition, important that in the end I want to show on the same column chart also the number of SO Items that were created not with EDI. I.e. I want to have a stacked column that consists of all SO Items and I see the part with EDI and the part without EDI.