Skip to Content
author's profile photo Former Member
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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2011 at 05:14 AM
    =Sum(([Order Quantity] * [Sales Price]) ForEach([Material]))
    

    should help!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    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

    Add a comment
    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

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2011 at 11:05 AM

    Hi all,

    Please let me know if you need more information.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.