How to calculate average value?

Hi all,
I'm using Lumira 1.15. I'm doing some practices with the sample dataset BestRunCorp... I want to calculate the average value of gross margin which is grouped by lines so that I can use a line chart to show the difference between the gross margin value and average value.
How can I achieve this ?
Best regards,
Shuang

It looks like it calculates the average based on the dimension
See below:
If you take the "Best run" Excel file, sort by country, calculate the average in Excel, it matches Lumira's 4,056 (for Argentina)
I am not sure I follow your divide by 12 logic?

Similar Messages

  • How to calculate Average value stock value - MC.B

    Hi All,
    When we execute T code MC.B  we get material analysis report . In it we have a column AVG VAL STOCK VALUE.
    Can some one explain how it is calculated. I see the formula
    The average stock value of the valuated stock is calculated using the formula:
             beginning stock value + n stock value at month´s end
                                    n + 1
    Can Some one explain how it is calculated and what 'N' stands for?
    Thanks,
    Vengal Rao.

    MC.B is inventory turnover.
    In the selection screen you enter how many periods to analyze.
    by default it is today 06/11 to 08/11
    n is the number of periods
    so you have a beginning stock of period 06/11
    + end stock of period 06/11
    + end stock of period 07/11
    + end stock of period 08/11 (which is todays stock)
    so the formula is:
    beginning stock value + 3 stock value at month´s end
    3 + 1

  • How to calculate Average balance for an account

    Hi,
    How to calculate average balance for an account for a particular period say for JAN-12 period and after the end of that period for another two days 01-feb-12 and 01-feb-12 ?
    I'm using the following query :
    SELECT cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6 "Account_XX",
    nvl(sum(l.accounted_dr - l.accounted_cr),0) "Balance"
    FROM gl_code_combinations cc,
    gl_je_lines l
    WHERE cc.code_combination_id = l.code_combination_id
    AND l.set_of_books_id ='XX'
    and code_combination_id = replace it with code combination_id for account_xx
    AND l.effective_date <= '31-Jan-12' (january period end ??)
    GROUP BY cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6
    There are some discrepancies in "average balance" after end of month (Jan-12)?
    How to calculate average balances for a particular account (Account_XX above)from end of month of Jan to first two days of february?
    Thanks,
    Kiran

    Kiran,
    Please let me know first, is Average Balancing feature enabled in your GL Ledger?
    Regards
    Muhammad Ayaz

  • How to calculate acquisition value for specified day

    Hi,
    in my z program I have a problem how to calculate acquisition value for my asset for specified day.
    Example:
    I have asset created 8.7.2008 with TTYPE 104 (External asset acquisition) with value 5950.
    30.11.2008 there is another TTYPE 272 (Retirement of current-yr acquis., w/o revenue) with value 950.
    So BEFORE 30.11.2008 acquisition value is 5950. After is 5000. Is there any function module (or something else) in SAP system where I can send asset number and date a it return to me acquisition value for that day?
    Many thanks for any answer!

    Hi,
    your suggestion means that I have to compute acquisition value by myself (sum all TTYPE 1** - sum all TTYPE 2**). So SAP does't provide such functionality (LDB ADA have it, because it can compute acquisitiob value for specific day)?
    Mant thanks for answer

  • How to calculates averages and send to a file?(source code)

    how to calculates averages and send to a file?(source code) I need to get started but I don't know where to begin...........the book I have doesn't really say how to handle averages and send to a file.................anybody got suggestions on how to get started? I am a newbie so place in layman's terms.............thanx

    To calculate an average: add all of the numbers together and divide by how many numbers you added together.
    ex: (1 + 2 + 3 + 10)/4 = 4 (4 is the average)
    As for writing them to a file, look over the API for random or sequential access files.

  • How to calculate average if some of measure values are 0

    Hi
    I created a webI report on top of a Bex query, I have a more than 10 different measure in WebI report column on which i need to calculate average.
    If I  use the Average function provided with in WebI report it is calculating average for the measures which are having 0  values too, but i need to calculate average on a column only for those values which are not 0
    Ex:  Measure Quantity has values in the report like
    100
    100
    0
    100
    100
    Average function is calculating as 400/5
    but I need 400/4, because one of the value is 0, so i need to avoid that count which is zero and should divide it by 4 but not 5.
    One way is to custom create measure for all measures and make a if else condition and divided by that custom measure, but is there any other procedure?

    i hope this can help
    =Average([myMeasure]) Where ([myMesyre] <> 0)
    good luck
    Amr
    before the 0 add <> not Equal too sign < and >
    Edited by: Amr Salem on Jan 19, 2011 9:29 AM
    Edited by: Amr Salem on Jan 19, 2011 9:30 AM

  • Script logic to calculate average value on nodes - SAP BPC NW 10.0

    Hi experts,
    I need to have in the parent members of the dimension TIME (2014.Q1, 2014.Q2,  2014.Q3, 2014.Q4, 2014.TOTAL) the average value of  their children and not the sum. For example :
    2014.01        2014.02         2014.03        2014.Q1
        1                  2                    3                  2                                          
    2 = AVG(1, 2, 3)
    I tried the script bellow but it doesn't work , it throws the error " ReferenceError : AVG is not defined"
    *SELECT(%TIMESET%,"[ID]",TIME,"[CALC]='Y'")
    *XDIM_MEMBERSET TIME = %TIMESET%
    *XDIM_MEMBERSET MEASURES = PERIODIC
    *WHEN DIM1
    *IS C02
    *WHEN TIME
    *IS %TIMESET%
    *REC(EXPRESSION = AVG(Descendants([%TIMESET%].CURRENTMEMBER)), TIME = %TIMESET%)
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    How can I achieve this ?
    Thanks
    Maha

    The best way is to enter 2 accounts: Productivity and Area, calculating by dimension member formula:
    ProductivityPerHectare=IIF([Area]=0,NULL,[Productivity]/[Area])
    If you have to enter ProductivityPerHectare and Area, then in script you can calculate Productivity:
    *WHEN ACCOUNT
    *IS Area
    *REC(EXPRESSION=%VALUE%*[ACCOUNT].[ProductivityPerHectare],ACCOUNT=Productivity)
    *ENDWHEN
    *WHEN ACCOUNT
    *IS ProductivityPerHectare  //user input
    *REC(EXPRESSION=%VALUE%*[ACCOUNT].[Area],ACCOUNT=Productivity)
    *ENDWHEN
    Then dimension member formula:
    ProductivityPerHectareCalc=IIF([Area]=0,NULL,[Productivity]/[Area])
    You can use arithmetic average of ProductivityPerHectare only if Area is always constant.
    In this case you can create some dummy account member DUMMY and fill it with 1:
    *WHEN ACCOUNT
    *IS ProductivityPerHectare  //user input
    *REC(EXPRESSION=1,ACCOUNT=DUMMY)
    *ENDWHEN
    Then dimension member formula:
    ProductivityPerHectareCalc=IIF([DUMMY]=0,NULL,[ProductivityPerHectare]/[DUMMY])
    Vadim

  • How to calculate average in result in BEx

    Hi Expert,
    I have 2 fields one is project and another # of days to finished project (I used formula to calculate the # of days from start to finished date. NOw in result need to calculate average of days took to finished all projects.
    I belive formula will be ( # of days / projects) but how we can apply in query. If anyone know please help out I really appericiate.

    Hi,
    Right click on your formula and go to properties, there you have the options as "Calculate Result as" and "calculate single value as" from the drop down box you can select option as "Average".
    Regards,
    Durgesh.

  • Creating function to calculate average value

    Hi,
    The below query was successfully return an average value. It returned 1 row.
    SELECT AVG(Volume)
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = ''14-mar-09' OR
    Day = '16-mar-09' OR
    Day = '');
    I tried to use that function on my created function below.
    CREATE OR REPLACE FUNCTION fn_Vol_Average
    ( v_DayLast_1_Week IN DATE,
    v_DayLast_2_Week IN DATE,
    v_DayLast_3_Week IN DATE )
    RETURN NUMBER IS
    v_Vol_Average NUMBER;
    BEGIN
    SELECT AVG(Volume) INTO v_Vol_Average
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = v_DayLast_1_Week OR
    Day = v_DayLast_2_Week OR
    Day = v_DayLast_3_Week);
    RETURN NVL(v_Vol_Average, NULL);
    END;
    I called that function by the following query. it was work, however it return the whole rows. It looks like the function perform the average calculation of each rows on the table.
    Can anyone help me what is going on with the logic?
    select fn_Vol_average('14-mar-09','16-mar-09','')
    from security
    --

    But since your function calculates the average over the whole security table, you wouldn't call this from a select statement which also reads the security table.
    You just want to execute it once.
    declare
       l_vol_average number;
    begin
       l_vol_average := fn_Vol_average('14-mar-09','16-mar-09','');
       dbms_output.put_line(l_vol_average);
    end;By the way, be careful with your date parameters. You should use TO_DATE with a proper format mask to prevent conversion errors.

  • Calculate Average value based on Day ??

    Hello,
    I am trying to calculate the Average value based on a day. The data is presented as follows...
    Day          SOCount
    Mon                34
    Mon                 56
    Mon                 67
    Tues               24
    Tues               25
    Tues               23
    Weds              45
    Weds              69
    The issue im having is that the Day column needs to be grouped first and the SOCount sumed together. Then the Average SO Count needs to be calculate based on this.
    Thanks

    Thanks for the reply,
    The solution you have provided only gives me the average of the count of the SO Count, not the actual average of all the values added together then  divided by the count..
    The report i am creating only has charts in it. So i am trying to create a chart showing the
    Average Sale Order Value by day.
    I should have metioned this from the start, sorry.
    Is it possible to do ?
    Edited by: davitali on Nov 4, 2011 6:32 AM

  • Read-in CSV and Calculate Average Value

    I've got a csv file which I'm reading in but need to calculate the average value of the second column (CPU). It's in the following format:
    Date CPU
    01/09/2014 25.3
    02/09/2014 22.3
    03/09/2014 26.2
    04/09/2014 22.1
    I basically need the average CPU for the month. Any advice?
    Thanks in advance
    Adam

    "Date","CPU"
    "01/09/2014","25.3"
    "02/09/2014","22.3"
    "03/09/2014","26.2"
    "04/09/2014","22.1"
    '@ | sc test.csv
    (Import-Csv test.csv | measure CPU -Average).Average
    23.975
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to calculate average not through basic formula

    Can any bodytell me how to calculate averge of 96 rows in the quey designer  not by hard coding them.
    Is there any formula for creating it through formula or through calculations .
    And also how to calculate the maximum value and minimum value of the entire 96 rows  which is picking from a Z table -ZDC_2100.
    Iam having time blocks of 96 for 24 hrs each of  15Min.

    Hi,
    You can achieve using a counter at baselevel and use exception aggregation at query level...
    Also check the below links might be useful:
    http://help.sap.com/saphelp_nw04/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/e0173f5ff48443e10000000a114084/frameset.htm
    Hope this helps.......
    Rgs,
    I.Ravikanth

  • How to calculate Average of Keyfigure

    Hi Gurus,
    I have a requirement where I have to calculate average of key figure value for 1 material.
    I tried using 'Average' in exception Aggregation but it just sums up everything.
    Can anyone please explain?
    Thanks

    Hi
    1. Include the key figure you want to average into the columns; call it KF1
    2. Create a Formula; call it CTR1, and in the detail view put a 1. (This 1-value is not used except to avoid an error in the formula syntax checker.) On the Aggregation tab, choose Exception Aggregation: Counter for all Detailed Values, and for the Ref. Characteristic, choose the same characteristic as the lowest level characteristic in the initial view of the output. E.g. if you only have 0CALMONTH in the output, choose 0CALMONTH. When you run this, the total at the bottom of this column should be equal to the number of rows in that column. Note that we use Exception Aggregation here so that the total at the bottom is calculated before the output is generated and is available to other formulas in the query design; if we were to use the Calculation tab it would look the same to us in that the total would appear at the bottom, but the calculation would occur too late for us to use within the query.
    3. Create a second formula, call it AVG1. The formula will be:
    SUMGT KF1 / SUMGT CTR1
    SUMGT accesses the Overall Result value at the bottom of the KF1 and CTR1 columns. You can find the SUMGT function in the Data Functions folder - turn on technical names first; the description is Overall Result. You could instead use SUMRT; the difference is that SUMGT will use the filters applied in the filter block; SUMRT will ignore them.
    3. Run the query. You should see the Average in every cell in the Average column. You can use this formula as input to another formula, or just use ( SUMGT KF1 / SUMGT CTR1 ) within a formula to access the average value.
    Thanks

  • How to calculate averages and send to a file?(source code)

    Having trouble the book isn't very clear on how to use averages.............could some give me an example of a program..................that gets averages and send to a file..........?

    From Deitel and Deitels monster 'How to Program' :
    import javax.swing.JOptionPane;
    public class Average {
    public static void main ( String args[] )
    int total, gradeCounter, gradeValue, average;
    Swing grade;
    total = 0;
    gradeCounter = 1;
    while ( gradeCounter <= 10 ) {      //assuming 10 values
    grade = JOption.showInputDialog ( "Enter grade: " ) ;
    gradeValue = Integer.parseInt ( grade );
    total += gradeValue;
    gradeCounter = gradeCounter + 1;
    average = total / 10;
    JOptionPane.showMessageDialog (
    null, "Class Average is" + average, "Class Average",
    JOptionPane.INFORMATIOIN_MESSAGE );
    System.exit ( 0 );
    Import package java.io
    Three stream objects are created when you execute , System.in, System.out, System.err
    System.out can be directed to send it's output to a file or disk.

  • How to calculate Average time from a date field

    Hi All,
    I have a date type field in my table .
    I want to calculate average time for a given country in a select query. Date has to be exculded. Only time has to be taken into consideration.
    Kindly help me.
    Sample data
    india 25-JUN-09 08:12:45
    india 25-JUN-09 09:01:12

    Take which one you want.WITH dates AS
      (SELECT sysdate x FROM dual
        UNION
       SELECT sysdate + 1 +1/24 FROM dual
    SELECT TO_CHAR(to_date(AVG(to_number(TO_CHAR(to_date(TO_CHAR(x,'HH24:MI:SS'),'HH24:MI:SS'),'sssss'))),'sssss'),'hh24:mi:ss')
       FROM dates;
    WITH dates AS
      (SELECT sysdate x FROM dual
        UNION
       SELECT sysdate + 1 +1/24 FROM dual
    SELECT floor(24 * AVG(x- TRUNC(x)))
      || ':'
      || floor(mod(24 * AVG(x- TRUNC(x)),1) * 60)
      || ':'
      || floor(mod(mod(24 * AVG(x- TRUNC(x)),1) * 60,1) * 60)
       FROM dates;By
    Vamsi

Maybe you are looking for