Hello everybody,
I am heaving a little problem with the BEx Formula Editor.
I would like to create a formula based on time dependent attributes; witch should provide me with an actual customer rebate.
The Query should look like (displayed in Excel/Analyzer):
Customer Rebate A Rebate B Rebate C Actual Rebate
1 5 % 10 % 0 (#) 10 %
2 2 % 0 (#) 0 (#) 2 %
3 5 % 0 (#) 0 % 0 %
Rebate A, B, C are attributes of different characteristics and for being able to use them in my formula (for Actual Rebate) I have created a formula variable (replacement path) for every rebate. I have already figured out, that there is no possibility to differentiate between real zero values and zeros being displayed because there is no value defined (#) (at least it seems so to me). So I added another attribute which is 1 if there is a value. For the following example lets call it Rebate X (exists)
The formula I would like to use should contain the following logic:
If (Rebate C (exists) == 1) {
Actual Rebate = Rebate C
} elseif (Rebate B (exists) == 1) {
Actual Rebate = Rebate B
} elseif (Rebate A (exists) == 1) {
Actual Rebate = Rebate A
} else {
Actual Rebate = 0
}
Any help would be appreciated.
Kind Regards
Simon Ulrich