Dear All I am looking for a solution to calculate a KPI based on a condition
I tried it with this statement but there is an error
CASE WHEN EKBE.VGABE LIKE 2 THEN SUM(EKBE.WRBTR) ELSE 0 END)
Page 1 / 1
Hi Marco,
you need to put the CASE WHEN inside the aggregation function:
Cheers
David
you need to put the CASE WHEN inside the aggregation function:
SUM ( CASE WHEN "EKBE"."VGABE" LIKE '2' THEN "EKBE"."WRBTR" ELSE NULL END )
Cheers
David
Hello @d.becher David,
thanks a lot and would would i work if i need a pull function?
CASE WHEN EKBE.VGABE = 1 THEN
SUM(PU_SUM(EKPO(EKBE.QTY, EKBE.VGABE,EKBE))
ELSE 0.0
END
thank you
thanks a lot and would would i work if i need a pull function?
CASE WHEN EKBE.VGABE = 1 THEN
SUM(PU_SUM(EKPO(EKBE.QTY, EKBE.VGABE,EKBE))
ELSE 0.0
END
thank you
@ All
Here is the formula that works.
(PU_SUM (EKPO,( CASE WHEN EKBE.VGABE LIKE 1 THEN (EKBE.QTY) ELSE NULL END )))
how ever now when I create another function the value duplicate sometimes in the olap table.
(EKPO.MENGE)-(PU_SUM (EKPO,( CASE WHEN EKBE.VGABE LIKE 1 THEN (EKBE.QTY) ELSE NULL END )))
Any idea? Thank you
Here is the formula that works.
(PU_SUM (EKPO,( CASE WHEN EKBE.VGABE LIKE 1 THEN (EKBE.QTY) ELSE NULL END )))
how ever now when I create another function the value duplicate sometimes in the olap table.
(EKPO.MENGE)-(PU_SUM (EKPO,( CASE WHEN EKBE.VGABE LIKE 1 THEN (EKBE.QTY) ELSE NULL END )))
Any idea? Thank you
Hi Marco,
the result of your PU function is now based on the EKPO table. When you add another dimension with another table, you are introducing the join to that other table. For example, if you introduce the join to the Activity table, you will see the result of your PU function next to every Activity of the corresponding case, because multiple rows in your Activity table belong to the same case.
For more information, you can check out the Join functionality page in our PQL Documentation.
Cheers
David
the result of your PU function is now based on the EKPO table. When you add another dimension with another table, you are introducing the join to that other table. For example, if you introduce the join to the Activity table, you will see the result of your PU function next to every Activity of the corresponding case, because multiple rows in your Activity table belong to the same case.
For more information, you can check out the Join functionality page in our PQL Documentation.
Cheers
David
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.