**Backround:**

I have produced an OLAP table with the following columns for an Order-to-Cash Dashboard analysis with SAP.

The dimension column variable is currently:

`"VBAP"."MATKL" || ' - ' || "VBAP"."MATKL_TEXT"`

.The formula for Sales Order KPI is:

`COUNT_TABLE("VBAK")`

The formula for the EDI Order KPI is:

`SUM(CASE WHEN "VBAK"."ZZEDI_FLAG" = 'X' THEN 1 ELSE 0 END)`

The formula for EDI % KPI is:

`KPI("Ratio", "VBAK"."ZZEDI_FLAG" = 'X')`

**Issue:**

I have two number KPI’s that display metrics for

- The # of EDI orders within the OTC process
`SUM(CASE WHEN "VBAK"."ZZEDI_FLAG" = 'X' THEN 1 ELSE 0 END)`

, and - The # of Sales Orders
`COUNT_TABLE("VBAK")`

The count for these are around 50k and 200k respectively, as they should be. Yet in the OLAP Table, *the sum of the rows in the column for EDI Orders is over 300k, and the column for Sales Orders is around 300k*, which are incorrect. This issue does not occur when the dimension is Customer: `"VBAK"."KUNNR" || ' - ' || "KNA1"."NAME1"`

. I am thinking that perhaps this only occurs when the dimension is from a VBAP table and the KPIs are VBAK?

Any thoughts would be appreciated.