Calculating 13 period average
<p><span style=" font-size: 12pt;"><font size="3" face="Times New Roman">I need to calculate 13 period average valuesi.e</font></span></p><p><span style=" font-size: 12pt;"><font size="3" face="Times New Roman">lets say if its feb,fy06 then it should calculate theaverage value of jan to dec of fy05 plusjan,fy06.</font></span></p><p><span style=" font-size: 12pt;"><font size="3" face="Times New Roman">i'm trying out something like this</font></span></p><p> </p><p><span style=" font-size: 12pt;"><font size="3" face="Times New Roman">IF @ISMBR(feb) and @ISMBR(fy06)</font></span></p><p class="msonormal"><span style=" font-size: 12pt;"><font size="3"face="Times New Roman">xyz=@SUMRANGE("member1",@CURRMBRRANGE("TimePeriods",LEV,0,-1,10))"member1"->FY06->P1)/13);</font></span></p><p class="msonormal"> </p><p class="msonormal"><span style=" font-size: 12pt;"><font size="3"face="Times New Roman">I'm not sure how to go back toprevious yr. and calculate the average value.</font></span></p><p class="msonormal">I would appreciate if somebody can help me outwith this.</p>
Whenever we define fiscal year, we make certain calculations easier and others more difficult. Making fiscal year its own dimension outside the time dimension makes year-to-year comparisions easy, but calculations like the one you propose a bit more difficult.<BR><BR>I keep fiscal year within my time dimension, so the <b><i>@prior</i></b> function makes calculations like you propose fairly easy. With a separate fiscal year function, you'll need to invoke <b><i>@prior</i></b> on the fiscal year, along with using <b><i>@lsiblings</i></b> to identify prior periods in the current fiscal year. That, <b><i>@sumrange</i></b> and a few condtionals and you'll have a formula<BR><BR>I regularly use a separate, low-overhead dimension to contain my time series calculations. For purpose of discussion I call the dimension "horizon" as that was the name used by the consultant I learned it from years ago. Horizon has one member where data is stored, "period", and includes all of the calculations for things like 13-week average, prior year, etc., all as dynamic calcs (2pass as necessary). There are some advantages to doing YTD and related time functions here as well. By doing this, I avoid duplicating formulas, moving UDA or otherwise modifying the outline.<BR><BR>This horizon dimension really becomes a real benefit when used with Analyzer or other reporting tool in conjuction with substitution variables that track current period and other key periods. It minimizes manual maintenance, while making all of the time series related values available for any periiod, not just the current period. <BR>
Similar Messages
-
Problem in calculating the Average Daily Requirement
Hello all,
I didn't understand how the system calculates the average daily requirement in Dynamic Safety Stock process. The following process flow in given in SAP notes to find how the system calculates the average daily requirement:
1. The system uses the defined parameters to determine the number of days used for calculating the average daily requirements. If the period is defined as a week, the period length as standard days (5 days) and the number of periods as 2, the system divides the total of the requirements by 10 days.
2. The system then calculates the total of the requirements for this period.
The system takes into account all requirements in the current period, even requirements that lie in the past but are still in the current period. For example, if the planning run is carried out in the middle of the month, then those requirements that were planned at the beginning of the month are also included in the calculation of the average daily requirements.
3. The average daily requirement is calculated using the formula:
Requirements in the specified number of periods / Number of days within the total period length
I have run MRP on 02/23/2009 and the following results are generated in stock requirement list of the component part:
Date Dependent Requirement MMSA Schedule Lines Quantity
3/3/2009 10 31
3/11/2009 20 20
3/31/2009 30 30
4/14/2009 40 49
4/22/2009 50 50
4/29/2009 60 60
5/11/2009 70 55
5/21/2009 80 80Hi,
In addition to my previous reply,
If you did following setting -
Range of coverage in first period -
min - blank
tgt - 7
max - blank
number of periods - blank
The system will calculate the safety stock for 7 days for each period; i.e., 7*3=21 and it will generate plnd orders as
week1 = 51
week2 = 14+21 = 35
week3 = 10+21 = 31
week4 = 30+21 = 51
If you want to restrict your calculation till 2 periods then make following settings -
Range of coverage in first period -
min - blank
tgt - 7
max - blank
number of periods - 2
Range of coverage in second period -
Make all blank
Range of coverage in the rest of the horizon -
min - blank
tgt - 3
max - blank
It means for first two weeks the safety stock will be 21 (equivalent to 7 days) and for rest of the horizon it will be 3*3 = 9 (equivalent to 3 days)
The Plnd orders will be -
week 1 = 51
week 2 = 35
week 3 = 14+9 = 23
week 4 = 30+9 = 39
and so on.
Regards,
Amol -
Auto check calculating the Average
I do not know how to approach an issue with my form, so any help or quide will be appreciate very much!
For a Performance Form I have 5 sections for the managers to fill in.
Every section includes an Assessment drop down list with 5 items to select from.
Items for DDList (Named:Assessment):
Outstanding
Exceeds Expectations
Meets Expectations
Needs Improvement
Does Not Meet Expectations
Final at the end of the form I have a section named
OVERALL SUMMARY OF PERFORMANCE with 5 check boxes named:
Outstanding
Exceeds Expectations
Meets Expectations
Needs Improvement
Does Not Meet Expectations
Is it possible with a script(Calculating the average?), AUTO to check(one of the check boxes for the Overall sum of performance?
THANK YOU
Hi Niall, I took your advise form your last sample cindle you have send me, I am close but still I have a problem at the end of the line!
Here what I have till now:
On change event for the Area1 the script below:
switch
(xfa.event.newText){
case
"Outstanding":
NumericField1.rawValue
= "5";
break
case
"Exceeds expectations":
NumericField2.rawValue
= "4";
break
case
"Meets expectations":
NumericField3.rawValue
= "3";
break
case
"Needs improvement":
NumericField4.rawValue
= "2";
break
case
"Does not meet expectations":
NumericField5.rawValue
= "1";
break
For a NumericField1(Score for Outstanding) on Calculate event the script:
var vScore=0 ;
for (var i=0; i<5; i++){
if (xfa.resolveNode("optionA[" + i + "]").rawValue=="5")vScore
+=xfa.resolveNode("optionA[" + i + "]").rawValue;}
NumericField1.rawValue= vScore ;
This I am getting(for NumericField1) is for example select Outstanding for all DDL is:55555 than 25 which is the desire!
How I can make it work, where is my mistake?
Thanks Niall -
Perpetual Period Average Costing - PPAC
Hi there,
I am using Perpetual Period Average Costing - PPAC, Can anyone tell me how can I do inventory revaluation to reconcile the variance between OPM inventory and GL inventory balance ?
Note : I have set profile option GMF: Book Allocations using current period basis to YES.
Any update will be very appreciated .....
RegardsYour driving table will be mtl_material_transactions.
Join it with mtl_system_items_b and cst_cost_details to get additional data.
Hope this helps
Sandeep Gandhi
Omkar Technologies Inc.
Independent Techno-functional Consultant
513-325-9026 -
Depr calculation- period control
Hello, I have an issue with depreciation calculation.
For two depr area 01,15 I choose the same depr. key(with reducing balance method)
For these areas have next depr value:
Area Period Value
01 1 100
01 2 90
01 3 80
02 1 100
02 2 100
02 3 100
02 4 60
02 5 60
02 6 60
02 7 30
So depr calculates for area 02 on quarter basis.
In OAYR have the same customizing for both areas.
ThanksSolved myself, issue was through russian add-on which use table J_3RMONTHACTIV for period control
-
Formula For Calculating An Average
I have the below formula in a group footer (Group Footer #1) that is suppose to calculate the average between the accumlated number of days (i.e. {@Days Taken}) divided by the number of records (i.e. Count (). The value for the number of days is correct and the value for the record count is correct. For some reason the value for the average is not correct. The average is not re-calculating when there is a new group. The average is repeated for each group. Is there anything wrong with this formula ?
Sum ({@Days Taken})/Count ()Lenell,
You need to tell it to divide the sums per group.
So;
Sum ({@Days Taken},)/Count (,)
Replace with the field that you are grouping on. -
Wallboard - Calculating daily average wait time
In Historical Reporting, if we look up a queue's average wait duration for the day we are given 5:34.
At the same time, if I pull up avgWaitDuration in RtCSQsSummary, I am given 190505. What number is this? Seconds? if in seconds, and the total calls answered for that queue is 248, then I should be able to divide 190505 by 248. When I do that, I get 768 seconds. 768 (12:48) is a far cry different from 334 (5:34). Where am I going wrong?Ok, I determined that the number is not actual ASA, but apparently "avg queue time". I assume this to mean the clock starts when the caller is placed in the queue, after completing the call tree.
I figured out how to calculate the time provided, and it matches the time in History Reporting for the "avg queue time". But the time we ACTUALLY want is the "avg speed to answer", as found in History Reporting for each queue.
What table would I find the ASA from the time the caller enters the call tree? -
Calculating weekly average in reports
I have a report that looks like:
Vol previous 7 day average
12
34
45
56
34
98
12 41.6
45 46.2
76 52.3
89 etc...
12
What would be the best way to do the previous 7 day average values in Reports 3.0.
Thanks for any assistance.
nullI have a table like this:
ViewID
ViewDateTime
I would like to have the weekly average of views and
have an output that looks like:
[Weekly Avg] [Week Starting]
Any help would be greatly appriciated.If I have well understood, then this will help you: (format is the format of your choice)
SELECT Avg(ViewID) "weekly Avg",
TO_CHAR(TRUNC(MIN(ViewDateTime), 'WW') + 1, 'format')
FROM t
GROUP BY TO_CHAR(ViewDateTime, 'YYYY') || TO_CHAR(ViewDateTime, 'WW')I began editing before your explanation so you can suppress the year if all your records are in the same one.
Message was edited by:
Michel -
I need to be able to calculate the average difference between a total average on a single row for example
Value , AverageTotValue , Difference
2, 4, -2
4, 4, 0
6, 4, +2
preferably using Discoverer plus (although I could write a function if necessary)
Can anyone help ?Hi , your query as you provided it , returns just one row , whereas mine returns three rows...so , i convert it to the following:
SQL> select value , avg_total , value-avg_total diff
2 from
3 (
4 select value , (select sum(value)/count(value)
5 from
6 (select 2 as value from dual
7 union all
8 select 4 as value from dual
9 union all
10 select 6 as value from dual)) avg_total
11 from (select 2 as value from dual
12 union all
13 select 4 as value from dual
14 union all
15 select 6 as value from dual)
16 )
17 /
VALUE AVG_TOTAL DIFF
2 4 -2
4 4 0
6 4 2[pre]
Now , as regards , the sql statistics...
Mine
[pre]SQL> with sample_data as (select 2 as value from dual
2 union all
3 select 4 as value from dual
4 union all
5 select 6 as value from dual )
6 select value , avg_total , value-avg_total diff
7 from
8 (
9 select value , (select sum(value)/count(value) avg_total from sample_data) avg_total
10 from sample_data
11 );
Ðñüãñáììá åêôÝëåóçò
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=8 Card=3 Bytes=48)
1 0 TEMP TABLE TRANSFORMATION
2 1 LOAD AS SELECT
3 2 UNION-ALL
4 3 FAST DUAL (Cost=2 Card=1)
5 3 FAST DUAL (Cost=2 Card=1)
6 3 FAST DUAL (Cost=2 Card=1)
7 1 VIEW (Cost=2 Card=3 Bytes=48)
8 7 VIEW (Cost=2 Card=3 Bytes=9)
9 8 TABLE ACCESS (FULL) OF 'SYS_TEMP_0FD9D6608_7E7090' (
TABLE (TEMP)) (Cost=2 Card=3 Bytes=39)
ÓôáôéóôéêÜ
2 recursive calls
8 db block gets
9 consistent gets
1 physical reads
604 redo size
598 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processed
Yours
SQL> select value , avg_total , value-avg_total diff
2 from
3 (
4 select value , (select sum(value)/count(value)
5 from
6 (select 2 as value from dual
7 union all
8 select 4 as value from dual
9 union all
10 select 6 as value from dual)) avg_total
11 from (select 2 as value from dual
12 union all
13 select 4 as value from dual
14 union all
15 select 6 as value from dual)
16 );
Ðñüãñáììá åêôÝëåóçò
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=3 Bytes=48)
1 0 VIEW (Cost=6 Card=3 Bytes=48)
2 1 VIEW (Cost=6 Card=3 Bytes=9)
3 2 UNION-ALL
4 3 FAST DUAL (Cost=2 Card=1)
5 3 FAST DUAL (Cost=2 Card=1)
6 3 FAST DUAL (Cost=2 Card=1)
ÓôáôéóôéêÜ
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
598 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
3 rows processedCoclusion: Yours is much less costly to system and so quicker.....
I have to confess that i have not thought this format ........I have learned something today....!!!!!!
I have get accustomed to using the with clause... but i may reconsider it....!!!!!!
Thanks , a lot for your valuable remarks....(as always)...!!!!
Simon -
<p>I have four groupings, Domain, Area, Priority (3rd level of grrouoping) and then Problem ID. Priority group could have values such as '1', '2', '3', '4' and '5' with corresponding "average" age formula on these group level. values.</p><p>Example: 1 Avg Age= 30</p><p> 2 Avg Age= 45</p><p> 3 Avg Age= 69</p><p>Reguirement: Display group name values and their corresponding average formula on a single line/row.</p><p>Sample Solution: Priority 1 = 30, Priority 2 = 45, Priority 3 = 69 </p><p> ***solution above should be displayed/concatenated on one line.</p><p>Your help is greatly appreciated, thank you in advance.</p>
So right now - your report looks like this
GroupHeader 1
GroupHeader 2
Priority 1 = 50 (actual display of Group 3)
Priority 2 = 75 (actual display of Group 3)
Priority 3 = 45 (actual display of Group 3)
Priority 4 = 9 (actual display of Group 3)
Priority 5 = 8 (actual display of Group 3)
And you want to change that so that it displays horizontally.
If there will only ever be 5 priorities, I think I would cheat the system a bit. Create a formula that runs at the group 3 level and dumps the values into 5 separate variables (formula below).
Then create 5 separate display formulas and put them in Group Footer 2 (if you already have a GF2 - then create a second one and move it above your current GF2). Suppress the G3 section and you should be close to what you are after (unless you also have detail sections, then we'll need to revisit).
This could also be accomplished with a multi-column subreport at the G2 or G3 level if you need more flexibility.
formula *******
numbervar priority1;
numbervar priority2;
numbervar priority3;
numbervar priority4;
numbervar priority5;
if {DB.Priority} = 1 then priority1:= {@avgGroupPriorityAvgAge}
else if {DB.Priority} = 2 then priority2:= {@avgGroupPriorityAvgAge}
else if {DB.Priority} = 3 then priority3:= {@avgGroupPriorityAvgAge}
else if {DB.Priority} = 4 then priority4:= {@avgGroupPriorityAvgAge}
else if {DB.Priority} = 5 then priority5:= {@avgGroupPriorityAvgAge} -
BEx calculation for 'average sales order value'
Hi all,
Can someone tell me how to use BEx query function to compute the <b>'average sales order values' by month</b>? Thank you.
J.Hi John,
You've two characteristics in the rows, right? Calendar Month and Order Type.
Try the option Calculate Result as Average of All Values and
Calculate Single Value as Nothing Defined? See if this works.
Or else in Modelling,
In the Info Object Create/Change screen, you can specify an Exception Aggregation based on
<b>Aggregate Reference Characteristic</b> Calendar Month.
I think there's an option for Average Values in the <b>Exception Aggregation</b> tab.
For more Information,
http://help.sap.com/saphelp_nw04/helpdata/en/75/21054da1392649948e5b94e4fc4bce/content.htm
Hope this helps.
Regards
Hari
Message was edited by: Hari Krishnan K -
Formula for calculating the average takings for a given day in the week?
I would like to calculate the average takings for each day of the week for a given financial year.
Rick,
I've looked at your document, made some additions and returned it to you. In your document you were not only using AVERAGE, but also MIN and MAX. Unfortunately, MIN and MAX don't have "IF" versions, so they can't be used to selectively operate on data matching criteria in a range.
What I did to accommodate the need for MIN and MAX was to add a column for each criteria, in this case the different days of the week.
In your document you also indicated the need for a Chart to graphically summarize the performance by day of the week. I rearranged your summary stats table to facilitate creating a chart from that table. I chose the mixed category chart with Bars for Min and Max and a Line for Average.
Following are Screen Shots for the modified Data table, the Stats table and the Chart:
The key expressions are:
For Monday receipts:
=IF(WEEKDAY($B)=2, $G, "")
For Monday Minimum:
=MIN(INDIRECT("Ledger::"&CHAR(70+ROW())))
You had pre-filled Column A with 3-letter abbreviations of the Days of the Week. I am not sure this is important, since you could have formatted the Date (Column B) to show the same information, but I didn't like seeing the abbreviations for days that didn't have data entered yet so I replaced the text with an expression...
=IF(LEN(B)>0, LEFT(DAYNAME(WEEKDAY(B)), 3), "")
I seems that you may have filled the table with several months worth of rows of Mon, Tue, etc. Now, if you wish, you can trim the blank rows to just a few and add more as you need them.
Let me know if you have any questions about maintaining the document.
Jerry -
Calculating an average in a Pivot Table column
Hello everyone,
I have a Pivot Table..
One Measure only
In Rows:
I have 3 fields: FieldA, FieldB, FieldC
In Columns:
I have 1 field: Field D
From field D, I have created 5 calculated items (to single out the column values) and a Total calculated item column to sum the 5 calculated items.
I have also enabled the Column Grand Total.
Now, I want to create another calculated item (I think?) to calculated the (Total calculated item column) / (Column Grand Total)
I tried creating a calculated item by doing the following (Total calculated item column) / sum(*), but this does not output anything.Re: how to Make a report from two cubes
This link will help you. -
Generic_137111-02 sun4v sparc SUNW,SPARC-Enterprise-T5220 Solaris 10:
I have couple of questions:
1. mpstat shows it has 63 CPUs but the spec says T5220 have 8 cores.
2. I don't understand what is threading technology in CPUs. What's the difference as compared to cores
3. How do I calculate load averages? When I do a top I don't know how to convert it into this CPU threading technology. How do I know if machine is overloadedThe Niagara processor is designed so there can be 8 parallel simultaneous threads (Hardware threads) running on a single core.
The T2 processor (Niagara 2) is capable of 8 cores, each capable of 8 parallel threads. So, effectively one T2 can run 64 threads simultaneously.
[http://blogs.sun.com/glennf/entry/getting_past_go_with_sparc|http://blogs.sun.com/glennf/entry/getting_past_go_with_sparc]
[http://blogs.sun.com/glennf/tags/cmt|http://blogs.sun.com/glennf/tags/cmt]
I'd recommend going through these two links (see above). It will save you a lot of grief when you go from single-threaded admins to multi-threaded admins. -
Logic for Calculating Period wise Stock??
I wasnt to get the stock of any year/period. I know it comes from MBEW/MBEWH .Can ny body tell me the logic to calculate stock? or there any direct table available from where it can just be picked up. I can not use stock standard report for some reasons.
Regards,
SunilHi,
If it is with respect to a plant and storage location, then we need to use MCHB and MCHBH tables in which Stock for the current period we will get it from MCHB and Stock for the previous period we will get it from MCHBH.
Opening Stock = Stock from MCHBH for the Period -1.
Closing Stock = Stock from MCHB for the Period
Regards,
Lijo
Maybe you are looking for
-
How do I create a DNS record on my Mac Server?
How do I create a DNS record on my Mac Server?
-
Query regarding RFC Call from R3 to BW
Hi i have one scenario. during running the delta program in R3, and at the end of the code, send an RFC message to BW, which can trigger a job in BW which will start 1 meta chain. please let me know how this can be done and what ABAP code needs to be
-
Transfer photo images to PC for printing
1. Tried saving image as jpeg and as png file (rather than PSD), but got errors when attaching to email as transfer media. 2. Tried to 'flatten the image' using PS editor, but most of the EDit function items are grey (inactive). Does anyone have sugg
-
Need to block all unknown and blocked numbers
-
Hi all , can you please help to resolve this issue? In OM module Sales order form we have request_date and schdule_ship_date and they are some default rules are defined as sysdate for both the dates and thses should be effected once you save the form