Question
IF variable XY=‘header’ THEN SUM-Function WHEN variable XY=‘item’ THEN Different-SUMFUNCTION
Dear Celonis community,
we have built the following OLAP Table for our Automatic Order Entry (AOE) types.
image1101180 5.54 KB
We have two KPIs for that: AOE Header and AOE Item calculating either the ratio of the Sales Orders (header) or Sales Order Items (item). We would like to switch between the KPIs via the yellow highlighted dropdown.
Clicking on the header item in the dropdown will fill a variable with the value header; same for item.
My Formular for the column EDI % is:
CASE WHEN <%= dropdown_aoe_header_item %> = header THEN
(SUM(CASE WHEN VBAK.AOE_MAPPING =EDI THEN 1.0
ELSE 0.0 END)
/
COUNT(VBAK.MANDT))
WHEN <%= dropdown_aoe_header_item %> = item THEN
(SUM(CASE WHEN VBAP.AOE_MAPPING =EDI THEN 1.0
ELSE 0.0 END)
/
COUNT(VBAP.MANDT))
ELSE NULL
END
I wanted to check the value of the KPI based on the variable value. However if i click on header/item it does not make a difference, but only the first calculation is done in both cases:
SUM(CASE WHEN VBAK.AOE_MAPPING =EDI THEN 1.0
ELSE 0.0 END)
/
COUNT(VBAK.MANDT)
Does anyone have an idea if this can be done like this?
Cheers,
Marcel
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.