I would like to define a new KPI to measure the ratio of eProcurement (EP) orders vs. all other PO doc types. The doc type information comes from the PO header (EKKO), however I’d like to show the ratio based on line item level (EKPO). The formula which I’ve set-up and which works fine for the ratio on Header looks as follows:
100 * AVG(CASE WHEN “EKKO”.“BSART” = ‘EP’ THEN 1.0 ELSE 0.0 END)
Somehow, I’ve to bring in one more variable to take line items into account: COUNT_TABLE(“EKPO”)
Any idea how to combine to show the ratio of EP PO items?