Movign Average Calculation

hoe the moving average calcualte?
i got one case. the client return the goods at the date that material stock is zero.
will this influnce to the MB03?

Hi Lucas
The calculation is as below when Goods receipt for PO
Balance on hand quantity + Goods Receipts quantity
Balance on hand value     + Goods Receipts value
New Moving Average Price = Total Value / Total Quantity
Asha

Similar Messages

  • How can I activate the average calculation with cl_salv_hierseq_table class

    Hi there,
    Iu2019m using class cl_salv_hierseq_table to display a two level hierarchy (header and item) list.
    For some reason it seams that those calculations are active by default with class cl_salv_table but not for cl_salv_hierseq_table.
    I tried every suggestion from the class documentation and SAP help and nothing seams to work, the menu calculation options are always inactive except for the total calculation.
    After the cl_salv_hierseq_table=>factory...
    And before cl_salv_hierseq_table->display( )
    I triedu2026u2026.
    cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 1 )
    cl_salv_aggregations->add_aggregation( 'COLUMN1' )
    COLUMN1 is a currency column in header level table
    u2026u2026..
    cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
    cl_salv_aggregations->add_aggregation( 'COLUMN2' )
    COLUMN2 is a dec column in item level table
    u2026u2026..
    cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
    cl_salv_aggregations->add_aggregation( columnname = 'COLUMN2' aggregation = if_salv_c_aggregation=>average )
    u2026u2026..
    cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
    cl_salv_aggregations->set_aggregation_allowed( 'COLUMN2' )
    u2026u2026..
    cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
    cl_salv_aggregations->set_numerical_aggregation( ).
    cl_salv_aggregations->set_aggregation_allowed( 'COLUMN2' )
    cl_salv_aggregations->add_aggregation( columnname = 'COLUMN2' aggregation = if_salv_c_aggregation=>average )
    u2026u2026..
    cl_salv_aggregations = cl_salv_hierseq_table->get_aggregations( 2 )
    cl_salv_aggregations->add_aggregation( 'COLUMN2' )
    cl_salv_aggregation = cl_salv_aggregations->get_aggregation( 'COLUMN2' )
    cl_salv_aggregation->set( if_salv_c_aggregation=>average )
    Any help will be appreciated!

    Thanks Harsh Bhalla,
    Subtotals can be built (displayed) at Header Level Only, true but the values to calculate those totals can come from either header or item level, otherwise it wouldnu2019t be of much use would it?
    Anyway my question is how to activate the average calculation as well because the totals calculations is already active for either item or header level by default.
    For reference when on the display layout Iu2019m referring to the menu Edit -> Calculate -> Mean Value.

  • Bug average calculation in form?

    Hye,
    I made an editable form in acrobat XI for mac.
    I set all the fields to number and the last field I want to calculate the average of all the other fields.
    So I select the fields which average I want...
    But upon testing, I'm getting impossible average calculations.
    F.ex. testing several fields with value "9", returns me a "0,..." value, which is impossible...
    How to solve?
    Thanks

    It's hard to say what's happening without seeing a sample. Can you post one somewhere? Unfortunately, you can't post one here, but can at Acrobat.com, dropbox, skydrive.com, etc.

  • Average Calculation

    Hi,
    I am finding some problem while doing the Average Calculation in the Query.
    My data is like this:
    Batch      Stock       PO Qty          STO Qty
    B1           1000         1000               200
    B1           1000         1000               500
    In the output I want:
    Batch      Allocated           Unallocated
    B1           700                    300
    The calculation for Unallocated is ( Stock - Allocated ).
    Right now I am getting:
    Batch      Allocated           Unallocated
    B1           700                   1300
    What I want is to do the Average of the Stock Qty and then subtract that from the Allocatde Qty.
    Can anyone help out?
    Regards,
    Soumen

    Hi,
    You can use the Calculated key figure (if you need top 10)...
    Regards
    sathis

  • Urgent!!Average calculation based on a characteristic!

    Hi guys
      I have an average calculation based on a characteritic ..
    Example:
       This is a SRM Mgmt.It has an Organisation purchasing org,source purchase,PR,etc..
    Report is a Survey rpt.
    Average Score across Customer responded for each question for the particular PR...
    Where weightage is applied for each question & based on which
                            total weightage of all Qns for a PR
      Avg.Score=     -
                                No of Questions.
    How do u calculate using the exception aggregation??????????Pls revert ASAP.
    thnx
    BI Learner

    Solving Myself

  • Add average calculation to FBL5N?

    Hi,
    My user requires an average calculation on one of the columns in FBL5N (customer line items).  This is a standard transaction which uses an ALV.
    I know that I can add new fields into this transaction using customizing but I need an average, so would need to create a new field and populate it with strange looking numbers in order to get an average total at the bottom.
    I have seen an average calculation button on some ALVs and was wondering if it's possible to change the ALV settings in the code of FBL5N in order to get this to show?  At the moment I can only total and subtotal, there is no average calculation button showing.
    Or, if you can think of another solution, any suggestions gratefully received.  The last resort is asking the user to download the data to excel and calculate the average there.
    Thanks,
    Gill

    hi
    select the column,  which u have to calculate the average .
    and select edit menu ->calculate->Mean value
    regards
    surender

  • Average calculation Problem

    how can i apply the average calculation on a varchar column means only average the number values in that column and leave or return null if any character value comes in average
    thanks

    Hi,
    Below is a conversion function, like Justin suggested.
    Using this will be slower than a pure-SQL solution, so if Ankur's sulution works for you, you may want to stick with that.
    CREATE OR REPLACE FUNCTION     to_num
    (     in_txt          IN     VARCHAR2
    ,     in_non_num_val     IN     NUMBER     DEFAULT NULL
    RETURN     NUMBER
    DETERMINISTIC
    IS
    --     to_num attempts to convert in_txt into a number.  If it can,
    --     then the value is returned.  If in_txt cannot be interpreted
    --     as a number for any reason (e.g., it contains letters) then
    --     in_non_num_val is returned.
    --     to_num (NULL) returns NULL.
    BEGIN
         RETURN     TO_NUMBER (in_txt);
    EXCEPTION
         WHEN     OTHERS
         THEN
              RETURN     in_non_num_val;
    END     to_num;
    SHOW ERRORS

  • Average calculation with joins

    Hi all,
    Please have a look here.,
    Re: average calculation using sql
    My Question is :
    Is it possible to do a join here,
    so that in where condition thistable.id=newtable.id
    and in column area i need projects from new table.
    i.e.,
    Projects Name Remark SUM AVG
    I tried with this query..
    SELECT Projects,Name,Remark, SUM(work_hrs), AVG(work_hrs) FROM (
    SELECT name,remark ,a.id,b.id,start_dt,end_dt,SUM(end_dt-start_dt) OVER (PARTITI
    N BY name,remark ORDER by Name) work_hrs
    FROM T a,T1 b) where a.id=b.id
    GROUP BY ROLLUP(name,remark);
    But o/p is not as i expect..
    Thanks in advance...

    The alias 'b' does not exist outside of the subquery/inine view. Try to alias your subquery for clarity then refer to it;
    SELECT MAX(sub.sr_pm_name), sub.ts_desc, sub.ts_remarks, AVG(sub.work_hrs)
    FROM (SELECT ts_desc,
                 ts_remarks,
                 b.sr_id,
                 a.ts_srid,
                 b.sr_pm_name,
                 ts_expected_date,
                 ts_actual_date,
                 SUM(ts_actual_date - ts_expected_date) over(PARTITION BY ts_desc, ts_remarks ORDER BY ts_desc) work_hrs
          FROM t_status_report b, t_task_status a
          WHERE b.sr_id = a.ts_srid) sub
    GROUP BY ROLLUP(ts_desc,
                    ts_remarks);Another way that might be easier to follow is to use the WITH clause;
    WITH sub AS (
       SELECT ts_desc,
              ts_remarks,
              b.sr_id,
              a.ts_srid,
              b.sr_pm_name,
              ts_expected_date,
              ts_actual_date,
              SUM(ts_actual_date - ts_expected_date) over(PARTITION BY ts_desc, ts_remarks ORDER BY ts_desc) work_hrs
       FROM t_status_report b, t_task_status a
       WHERE b.sr_id = a.ts_srid)
    SELECT MAX(sr_pm_name), ts_desc, ts_remarks, AVG(work_hrs)
    FROM sub
    GROUP BY ROLLUP(ts_desc,
                    ts_remarks);

  • Weighted average calculation in query

    Hello
    i'm having some issues calculating an weighted average...
    imagine the next scenario
    LINE | FORMAT | TIME | WORKERS
    10    | 000123    | 10   | 5
    10    | 000123    | 350  | 2
    10    | 000123    | 75   | 1
    From this i need the wighted average of the nr workers considering the time they were working
    so, to calculate that i have to do for example:
    (time * worker)/total time
    in numbers...
    ((105)+(3502)(75*1))/(10350+75)
    =1,89 workers for that line, for that format and for all that time
    I am able to do that formula inside bex analyser, however when the user drills down the report or sorts the key figures in other order the result is not correct.
    any suggestions?
    Best regards

    Hi Ricardo
    What we did, in a similar case, we used two formulas. The first one was the calculation (time * worker) with exception aggregation (summation).
    The second formula was the previous formula divided to time.
    The trick is which characteristic to use for the aggregation in the first formula, i think you should have the most detailed one.
    Then i believe the two formulas will calculate correctly the weighted average based on any selections/analysis that you do.
    Regards
    Yiannis

  • Average Calculation for Available Data only

    Hello Gurus,
    I have a requirement where I have to calculate Daily average based on Hours (24 hours). We get one reading for every hour. SO 24 readings and divide them by 24. It works fine when I do a calculation like ([Measure]/24) as Hours would always be constant.
    The problem comes when we miss some readings for few hours. In that scenario User do not want to take those hours into consideration for which reading is missing.
    How can I achieve that?
    Any suggestions?
    Regards
    Shalini

    Hi,
    Try this formula.
    =sum([Measure])/count([Measure]) where ([Measure]>0)
    or
    =sum([Measure])/count(sum([Measure]) where ([Measure]>0))
    Amit

  • Field average calculation

    I am designing an Employee Review form and in that form I have a field that calculates the average of a set number of other fields. The problem is that the users can enter 1-5 or n, where n = no experience. I want the average field to only average the fields with 1-5 in them and skip the n fields. I have tried multiple ways of acomplishing this, but none have worked. Really could use some help on this one!!

    Have you tried a "Custom Calculation Script"?
    A custom calculation script will required the use of specific field names to be processed.
    Unless you are computing the average on all items you might consider using a function for counting and summing the fields and values in a range of questions.
    Since it is possible that no questions could be answered, you need to allow for a count of zero items being used for the computation.

  • Average calculations with dates

    Hi,
    I have a problem with calculating the average time a call lasts. I have a start and finish time to a call that are stored in a database in datetime format. How do i find out the time of the call and then get an average over the number of calls made in a month. I have to hold the time format and show the result in the same time format that is in the database. How do you do this? I know how to do it with decimals but how to manipulate time confuses me.
    Cheers
    Niall

    You can use the method getTime() of the class java.sql.Timestamp, which returns milliseconds in the long type, and toString() method of java.sql.Time may serve your aim here.

  • HELP !!! average calculation

    Hi,
    I want to calculate the average number of products sold by an agent. The formula is Avg = (nr. prod / nr. clients) where nr.prod is the number of unique products sold to a customer and nr. clients is the number of customers.
    It works just fine when the customer is drilled down. In this case nr.prod is calculated fine, nr.client = 1 and the subtotal is calculated as average - that's what i want.
    The problem occurs when I remove the customer drilldown - in this case the nr.prod is no more calculated as a sum of products for all the agent's customers but as the number of products for this agent. 
    The nr.prod and nr.client are calculated key figures as count all values for reference characteristic customer/material (in the aggregation exception).
    thanx
    daniel

    the average is calculated as nr_p/nr_c.
    result with customer drilldown:
    agent     customer     average=nr_p/nr_c     nr_p     nr_c
    A     X1     3,00     3,00     1,00
         X2     2,00     2,00     1,00
         X3     4,00     4,00     1,00
         X4     5,00     5,00     1,00
         <b>result     3,50     14,00     4,00</b>
    if I hide customer then i'll have:
    agent     average=nr_p/nr_c     nr_p     nr_c
    A     <b>0,75     3,00     4,00</b>
    nr_c = calculated key figure, aggregation =summation, aggregation exception= count all values, ref. characteristic = 0customer
    nr_p = calculated key figure, aggregation =summation, aggregation exception= count all values, ref. characteristic = 0material
    the problem is that I need this nr_p as sum of nr_p for each customer. How can I make this sum without the customer column ?

  • GrandTotal Average calculation.

    Hi
    My report has following fields.
    Tower, Prjid, Rating.
    I want to dispaly total number projects and average rating of projects  for each tower.
    so i group the data by towr wise.
    i am using this formula to calucate toweraverage rating
    @toweravg= Sum ({TOWERSUMMARY.OverallRating}, {TOWERSUMMARY.Tower}) / Count ({TOWERSUMMARY.ProjectCSSId}, {TOWERSUMMARY.Tower})
    for calculating grandavg i am using
    avg(@toweravg) , but this formula showing error liike  This field can not be summarized.
    So how to calculate grandtotal of  avg?
    sample data:
    1 4.00
    2 2.50
    i want in the end like
    3   3.25((4.00+2.50)/2)

    I am asuming you are getting 4.50 and 2.00 from this
    Count ({TOWERSUMMARY.ProjectCSSId}, {TOWERSUMMARY.Tower}
    You have to use the same without the last bit i.e.
    Count ({TOWERSUMMARY.ProjectCSSId})
    and place it under Report footer.
    This will count all of the above.
    Then use that and take average.
    Regards
    Jehanzeb

  • Load average Calculation

    Hi,
    How the load average in a solaris system is calculated. What is the threshold level of load average, which could be panic to server.
    Regards,
    Siva

    We had a large system with over 100 cpu's running Solaris 10, and the highest load point average (LPA) that I saw was over 1000. The system was slow but did not panic.
    I believe that the LPA divided by the number of cpu's will tell you the number of jobs per cpu which are runnable. If the LPA is larger that the number of CPU's then you are time slicing between the available jobs, and getting less than a full slice per job.

Maybe you are looking for

  • System Prefs in OS X with SSD Boot Drive

    I tried an OWC SSD last fall as the boot drive in my Quad-Core Mac Pro and liked the speed but had issues with wake from sleep or booting. I use a UPEK fingerprint scanner for the admin PW and sometimes the unit would boot to the login dialog box wit

  • Weighted avg Unit Cost calculation for COGS

    Hi friends, Has any body done weighted avg unit cost calculation for inventory valuation and COGS calculation. In a way we need to mirror ECC material ledger functionality based on the APO data in side the planning tool. Any ideas on the above!!! Kin

  • How do I get my work discount in my bill

    Discount on my bill???

  • Error 0x02a2c2ed occurs when trying to print

    I am a mac user but i use microsoft word for my documents etc. i can print everything except microsoft documents. please help me fix this asap! when i try to print it the error code 0x02a2c2ed occurs

  • Starting workflow on delete action

    Hi, I am updating another table in the database whenever an attribute value is changed (insert, update, delete) in the master data table. To perform this action, I have created a business rule (with event as "has changed") and it triggers a workflow