Forum Discussion

dniedrauer's avatar
dniedrauer
Resolver I
9 years ago

Sum of elements

Here's my issue: I have a formula calculating a refund amount by product for over/under consumption. Idea is refund/charge for more than 10% over/under consumption: 

 

Refund/Charge = (switch(TRUE(),[Consumption Qty]<[Allocation -10%],[Allocation-Consumption]-[Allocation]*.10,[Consumption Qty]>[Allocation +10%],[Allocation-Consumption]+[Allocation]*.10,0))*[Net Price]

 

The formula works just fine by chemical: 

Output

Chemical 1 (3940) 

Chemical 2 250 

Chemical 3 (45) etc 

 

The problem is, I need a total too. Total given is $7, but total of refund/charge for each chemical (adding each line item) is 10,319. 

7 Replies