Hello,
I try to count the number of sales order items based on a filter on headers.
I manage to do that:
SUM(CASE
WHEN VBAK.BSARK NOT IN (ZWEB, DFUE, ZMYP, ZMWS, ZTEL, ZPBI)
AND VBAK.ERNAM NOT IN (BZTLK, BTS16)
AND VBAK.VBTYP = C
THEN 1
ELSE 0
END)
But it only counts sales orders and not sales order items.
Note that I manage to do it with a Pivot Table (since we can choose on KPI to count VBAP or VBAK) but I also want to have percentages on the same OLAP table.
Thank you in advance
Antoine