cancel
Showing results for 
Search instead for 
Did you mean: 

Webi formula help

0 Kudos

Hi All,

I have the scenario below that I need help on creating a formula for.

Current Behavior:

Desired Behavior:

I would like to create a formula to add amounts from Code 'DEF' with the description 'Income' to Code 'ABC' only if Code 'ABC' is 0 or null. This example is seen for partner 1234 where the amount of 4000 is the same, but for partner 3333 and 2222, the amount from Code 'DEF' is added. As shown in the examples, there are also multiple entities that I would like this formula to apply to as well.

Any help will be appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

ayman_salem
Active Contributor

define the following variable:

v_Amount: = If ([Code] = "ABC" And ( [Amount] = 0 Or IsNull([Amount]))) Then ([Amount] Where ([Code] = "DEF") In ([Partner])) Else [Amount]

...

hope this is what you are looking for and it helps