Former Member

Summation Problem in variables

Hi Experts,

i am having a problem while doing Sum for a field.

I created a Variable by the name Plan Cost and the calculation for that is

Plan Cost = "Order Quantity * Sales Price"

I am having Material Group and Material in my report.

Material Group, Material, Order Qty, Sales Price, Plan Cost.

MG1 m1 4 10 40

MG1 m2 3 15 45

MG1 m3 6 20 120

My Total comes to (40 + 45 + 120) = 205

But if i remove the Material from the report

The total comes to

Material Group, Order Qty, Sales Price, Plan Cost.

MG1 13 45 585

585 = (13 * 45)

Now the total comes as 585, while i want 205.

Can anyone help me how to solve this.

I want plan cost to calculate for Each material in the material Group and than calculate.

10|10000 characters needed characters exceeded

Related questions

Former Member
Posted on Nov 22, 2011 at 05:14 AM
```=Sum(([Order Quantity] * [Sales Price]) ForEach([Material]))
```

should help!

10|10000 characters needed characters exceeded
• Former Member
Posted on Nov 18, 2011 at 11:18 AM

Hi

I am trying on(webiXi 3.1) that but couldn't get the complete solution,if u remove material number and use foreach(materialNumber) u wont get result , if we try to use forall then you will get sum of product (585)

if u keep the material number beside material group then i use the formula like this

(Order Quantity * Sales Price) foreach(material Number) in (material group) u will get product for each material and sum it up .

Hope this helps

Sunil

10|10000 characters needed characters exceeded
• Former Member Former Member

Hi MTALIS

what if he removes material number then he will see only multivalue in that cell isn't it ? what we have to do is sum it up and copy the formula and replace it in multivalue cell so when ever he keeps the material number key it sum splits ,when ever he removes it the sum will be in that cell .

Any how your formula works great .But small corrections isnt it ðŸ˜Š

sunil

• Former Member
Posted on Nov 18, 2011 at 11:05 AM

Hi all,

10|10000 characters needed characters exceeded