Average quantity for Prior weeks

Hello Friends,
I have a requirement to calculate prior 4 weeks quantity average and price average.
And also I have to calculate price variance by substracting current weeks price with previous weeks price.
I have price and quantity are in KF, and calyear/week in free characteristcis.
Can you please help me?
Thanks
Priya

Hi,
I have followed below suggestions and it didn't give me any results.
Currently, I have 3 KF, quantity, price and total price.and Calweek/year which is restricted to current calweek and previous week in KF section.
And it displays results like this, and which is what I wanted.
07.2007                    06.2007           
Quantity Price Total Price   Quantity     Price     Total Price
In addtion to this results, I have to display prior 4 weeks average of Quantity,Price and total price.
These are the steps I have followed:
Created a structure, 4 new selections for four prior weeks, with offsets on calyear/week till -4, by having quantity in the selection. I am not able to do the formula as price and quantity doesn't appear for those four columns I have created for prior weeks.
I appreciate your help .
Thanks
Priya.

Similar Messages

  • CATS: Batch changes for prior week's records

    We have requirements to develop a custom application that will address what we call "Labor Cost Transfers" (LCT).   The customer does not allow employees to manually change their time in CATS for prior weeks.  Instead, they must submit an LCT request (via email) to a centralized admin group who then manually makes the change in CATS.  The new Web Dynpro application will automate requesting, approving (two levels) and reporting of these LCTs.  A new batch program will be developed using traditional ABAP to process these approved requests and update CATSDB - probably on  a weekly basis.  
    On the request screen, the user will enter selection criteria (e.g. PERNR, W.E. Date, Receiver Cost Object) to identify the CATSDB data that needs to be changed.  The application will present the data in rows like the CAT2 time sheet with a Saturday thru Friday view.  The user will select the "FROM" (BEFORE) row to be changed and enter their "TO" (AFTER) data in the "TO" section below - again like the CAT2 time sheet view.
    The planned design includes two new custom (Z) tables...one to hold the FROM data and the other to hold the TO data.  The FROM table is sort of like a header table that will contain the CATS data values before the change as well as the admin data associated with the request (requester, approver, status, dates, etc.).  The TO table has the CATSDB values that the requester wants the record(s) changed to.
    This application will only allow the user to transfer hours from one receiver cost object to another for the same A/A type.  (In other words, they cannot move hours from one A/A type to another).  This means their change will not impact payroll.  (Such payroll adjustments will be addressed in a future project).
    I'm giving this background information so that I can ask a few general questions - that may lead to more if I can any responses.
    Questions:
    1)  Have any of you developers been involved - or know of - similar custom applications?  If so, what approach was taken?
    2)  Because the LCT request data is at the time sheet row level and the batch update program must update at the CATSDB record level, I'm thinking that I will have to use the DELETE and the INSERT BAPIs rather than the CHANGE.  Do you agree?
    3)  Do you find it strange that the customer will not allow employees to change their time sheets for any prior periods?  How far back can employees change their CATS data at your site?
    Any feedback will be greatly appreciated.  
    Ralph

    ktallman wrote:
    Sorry. Here's the link to the similar post (with the Apple Script): http://discussions.apple.com/thread.jspa?messageID=8001104&#8001104
    that apple script is actually mine, lol.
    I actually added 4 custom fields in the address book, to align to the 4 from the Treo, but I see that they don't map to the iPhone. There is a date field on the iPhone for when we met, which is one of my custom fields, but I don't see a corresponding field in the Address Book.
    Yes, I would like to substitute one string for another ("X-Palm-Custom3" to "Directions") everywhere it occurs in the Notes field.
    ok, the following apple script will do it.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Address Book"
    repeat with per in people
    set x to note of per as text
    if x is not equal to "missing value" then
    set note of per to do shell script "echo " & quoted form of x & "|sed 's/X-Palm-Custom3/Directions/g'"
    end if
    end repeat
    end tell</pre>
    Paste it into Script Editor and hit "run".
    Thanks.
    Ken

  • Average quantity for a given period

    Hi All
    Is there any standard report for arriving at
    Average quantity , maximum quantity and maximum days in stock for a particular material or list of materials.
    If not all together atleast sepwerately.
    Kind regards
    Samson

    Check MC42 and MC44

  • BW reporting question (want to break down the data for 13 weeks)

    Hi All,
    I am building one report in BEx and in that report I need to calculate the data for last 13 weeks.
    What I want here is to breakdown the OTD to CT2R%   and Average delta for 13 weeks.  I mean I want to repeat the same calculation for 13 weeks.
    How can I repeat this calculation and how can I restrict per week.
    OTD to CT2R  (On time delivery to Cycle time to replenish)
    See below the template of my report.
                                  week 1                                   week 2
    Item    OTD to CT2R%    Average delta   OTD to CT2R%   Average delta
    x                 x                      x
    Thanks,
    Kam

    hi, usaully production system will be non changeable for all objects.. but as far as SAP BW is concerned we can make certain objects changeable by setting as follows..
    in production go to RSA1 - Transport Connection, select Object changeability button from tool bar, here you will find a list of objects which can be made changeable in a closed system.. just click on required objects and set it to Everything Changeable..
    Reg,
    Pradhiba
    <REMOVED>

  • 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

  • Defining "prior-week" timeframe dynamically for scheduled reports

    I have a number of reports that I need to execute each week.  But, the scheduling options don't allow me to kick off the report on a Sunday AND constrain the timeframe to the prior week (Sunday-Saturday).   I have a prompt built into the original query, but that's useless if I want to automate the output. 
    I was successful getting the query to work against the upstream database using the following query fragment:
    BETWEEN CURRENT_DATE - INTERVAL '7 day' AND CURRENT_DATE - INTERVAL '1 day'
    But, there is no option to enter this query into the BI.Ondemand UI. 
    Any insight would be helpful.   This issue is hindering progress with our metrics automation plans.
    Regards,
    -Joe

    I'm using the Web-based version of BI.ondemand.  
    I don't have access to the OnDemand Desktop Publisher because the hosting provider I'm using doesn't support it.  
    The scheduler is very unstable in the web version. I often get "page not loaded" errors in the prompt window within the popup scheduler.  
    I've also just determined that the week-definition in BObj is Monday-Sunday and not Sunday-Saturday.   I'd need to make that adjustment as well. 
    --Joe

  • Display difference current week to prior week

    Hi everyone,
    I have following question. I need to display in a Report the difference from the current week to the prior week. I need something like this:
    weeks       |      quantity      |    difference to prior week
    30          |     1000           |
    31          |      500           |     -500
    32          |      800           |      300
    33          |     1200           |      400
    34          |     1000           |     -200
    By starting the report the user enters the "start_date" and "end_date".
    For this example the user enters from "19.07.2009" to "22.08.2009"
    Do you have any ideas how to solve this?
    Many thanks in advance
    Mario

    Hi Salah,
    many thanks for your answer but this doesn't work on my side because each week is a summary of many different records from the database. If I work with "previous" it only subtracts the last quantity from the weeks summary, not the last weeks summary from this weeks summary.
    Is it possible to change the formula to something like this:
    sum ({quantity}, {@calendarweek} ) - previous (sum ({quantity}, {@calendarweek} )
    something like this whould help me I think but I receive an error from the "previous" too much parameters
    Now I tried to create a new formula like this:
    @quantity_calenderweek
    = sum ({quantity}, {@calendarweek} )
    and used it with my previous formula:
    {@quantity_calenderweek} - previous ({@quantity_calenderweek})
    but now crystal sais that this field hast no prior or following value...

  • How to keep the field value in the forms for one week

    I have an application that when the user logs on to it , it shows all the documents that are in the current dept.
    the form has the following fields:
    document no
    sent date
    assigned to
    dep_LOV
    and a check box
    if a user clicks the check box and assignes the document to another dept by cliking the LOv then the assigned to field should be populated with the new value and the sent date should be today's date(sysdate). the requirment is that once the user assignes the documnet to certain depts (for example sales dept) the assigned to field and the sent date should show up in the form for one week and the user should be able to see that data in the form the next time she /he logs onto the application. the one week time is to make sure the documcnt has reached the assigned dept. after one week from today's date the updated assigned_to field and the document no should not display on the form. During the one week if the user logs on to the form again that particular document and the assigned to and sent to fields shoould be grayed out and shhould not be updatable. I will greatly appreciate any suggetion as of what to do to solve this problem. it is urgent. Pleade help

    -> so you are saying that I should have a block level post_query trigger and put the where clause in it?
    No. Post-query trigger runs AFTER the query has been executed, and it runs once for each row fetched. It is for other purposes, NOT for setting a where clause.
    -> Plus i want to be able to gray out the field once populated with the sales dept.I have come up with the following code:
    Your Set_item_instance_property is almost correct. And THAT line would go into the Post-Query trigger. This is what you might use:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> Set_item_instance_property ('docs.assigned_to',:system.trigger_record, Enabled,Property_False);</font></pre>
    Please watch your use of underscore, dashes, commas and parentheses: _ - , ( )
    The way to set your default where clause would be the following, and you should do it in the key-exeqry trigger, or someplace similar:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> set_block_property('DOCS', default_where,
    'NVL(sent_date,sysdate) >= sysdate-7' );
    Go_block('DOCS');
    Execute_Query;</font></pre>
    I used the NVL function so your select will show rows where sent_date is null OR sent_date has a value that is within 7 days prior to the current date.
    What is the field :docs.assigned_to used for? If you want to include ONLY rows that are assigned to a particular person, then your where clause might be:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> 'assigned_to = :ctrl.assigned_to and NVL(sent_date,sysdate) >= sysdate-7' </font></pre>
    and you should have a control block with the assigned_to field in it, where the user can enter a value before querying the DOCS block.

  • Please help - unable to sign into iTunes for two weeks

    Hi,
    This is my last resort I've been through iTunes support and they referred me to this forum. For 2 weeks I've been unable to sign into iTunes. I cant do this on my MacBookPro (OSX 10.5.8) or my iPhone. It just hangs and then I get the error: 'We could not complete your iTunes store request. The network connection failed. There was an error in the iTunes Store, Please try again later'
    I've re installed iTunes, had my password reset and have called my ISP and found out that there is nothing wrong with my network connection. I'm having no other problems with connecting to sites, sending emails etc, only with iTunes. And prior to two weeks ago I had no problem signing in. Please if anyone has any suggestions it would be great as apple seems to have given up on me.
    Thanks very much!
    Lisa

    In System Prefs>Personal - check in the Security>Firewall tab and see what are your settings.
    MJ

  • 'Moving average price for material is negative' calculation

    Hi Gurus,
    I would like to ask for your assistance regarding Invoice having error of 'moving average price for material is negative'.
    How is it being calculated that it goes to negative value? Can you also please give a scenario on why it became negative?
    We have the following scenario:
    MAP: 0.30
    Total Stock: 9
    Total Value: 2.74
    PO raised and GR was done:
    Quantity: 240
    Value: 2.95
    Would appreciate your assistance on issue.
    Thank you.
    Jih

    Hi,
    Please check that price of that material is increased or decreased by using transction MR21. after GRN.
    You posted a valuated goods receipt for a purchasing document for a material with moving average price control.When the invoice was posted (invoice item with price variance for goods receipt), the system generates error message M8783: 'Moving average price for material & & & is negative'.
    Between the posting of the original goods receipt and the entry of the invoice, the system already posted additional valuation-relevant transactions/events (goods movements, invoices and so on, can be displayed with Transaction MR51).
    The invoice verification tries (for stock coverage) to credit/subsequently debit the difference between the value of goods received and invoice item value for the stock.However, the material total value must not become negative by this stock posting.
    Solution
    Before you post the invoice, you must first increase the stock value.
    The amount by which the stock value must be increased at least can be calculated from the following values:
    1. Transaction MM03, accounting view material master, field 'Total value' (MBEW-SALK3)
    2. Invoice item value according to invoice
    3. In the invoice verification (Transaction MR01, MR1M, MIRO), change the invoice item amount to a value which is high enough and simulate the invoice to receive the value which would be posted for this item to the GR/IR account.
    In the invoice verification, the value (3) minus (2) is posted to stock. It must be larger than (1).Post a subsequent debit with the amount (3) + (1) - (2) for the affected material/plant (Transaction MR22).
    You can post the invoice afterwards.
    Regards.
    Edited by: Sachin on Sep 24, 2009 9:11 AM
    Edited by: Sachin on Sep 24, 2009 9:13 AM

  • Filter for rolling week column on # of opportunities

    Hi all - I am trying to create a report that shows the # of projects for the last 13 weeks with a column for each week.
    I can get the filter correct for the current week, but am not sure how to revise my sql expression for the previous weeks.
    I am using the "In between" operator on the created by date column with the following sql expressions:
    TIMESTAMPADD(SQL_TSI_DAY, - (DAYOFWEEK(CURRENT_DATE) -1), CURRENT_DATE)
    and
    TIMESTAMPADD(SQL_TSI_DAY, 7-DAYOFWEEK(CURRENT_DATE), CURRENT_DATE)
    As I said, this works to get the current week's data. Does anyone know how I would revise this to look at the week prior or two weeks prior?
    Thanks for any help!
    Lacey

    Hi !
    As I understand, you want a report showing the # of project per week for the current week and the 12 weeks before ? But based on which date ? The project creation date (I assume you have a field like this) ?
    In this case, you will have to put a filter saying something like :
    Where "Creation Date" beetween "Current Date" and "Current date - 12 weeks".
    *"Date Opened".Date BETWEEN TIMESTAMPADD(SQL_TSI_WEEK, -12, CURRENT_DATE) AND CURRENT_DATE*
    I assume you'll have to use the TIMESTAMPADD function with SQL_TSI_WEEK interval, the current date and the 12 value.
    I tested it on service request creation date to have the # of service request for the last 5 weeks, it worked...
    Hope this will help, feel free to ask more !
    Max

  • Recently ordered an unlocked iphone 4s on Nov. 24th. However, I have yet to receive a shipment notification email. Status of order has been on processing items for a week now. Anyone know how long it generally takes to receive shipment notification?

    I recently ordered an unlocked iphone 4s from the apple store online on Nov. 24th. However, I have yet to receive a shipment notification email. The status of my order has been on processing items for a week now. Does anyone know how long it generally takes to receive shipment notification?

    Jneklason wrote:
    ~snip~
    I know this email is confusing and really hard to understand...perhaps now you will know how i've been feeling--lost and confused with all the mis-information, with a hit and miss phone, and out of time with all the 1 1/2 hr to 2 hrs EACH wasted on this issue.
    On top of all this, I can't even find out how to file a complaint with anyone higher up than Customer Service.
    I hate to tell you this, but you didn't write an email. You wrote a discussion post on the Verizon Wireless Community forum which is a public peer to peer forum. Unfortunately since you didn't mark your post as a question, the VZW reps that roam this community won't ever see your post. Before you re-post it, don't. Duplicate posts get removed from the community.
    I see there were several missteps both by the reps and yourself in your post. First you should have insisted on returning the phone within the 14 day return policy period. Second which Samsung Galaxy mini model did you purchase? The S3 mini or the S4 mini? Did you do any research prior to deciding on this device. The reps at that time deflected the easiest course of action, by trying to get you to replace the phone under insurance instead of returning the phone. The Early Edge payment option requires the current phone on the line using the early Edge must be returned to Verizon Wireless. Did you once considered going to a third party site like Swappa to purchase a gently used device for your daughter?

  • Report including open purchase order quantity for one storage location

    Hello gurus,
    I am looking for a report giving me the total/available stock and the open purchase order quantity for all materials stored in a certain storage location.
    I.e. like this:
    Plant 0001, storage loc. 01
    Material        stock        open purchase order quantity
    100000        200 pcs.   50pcs.
    Is there such a report in SAP standard?
    Thanks
    Alicia

    hI
    U want the report like this ,
    MAterial stock availablein storage location and with Open PO quantity for the same material.???
    This report u can get in 2 different transaction . the n u can combine and create one custom transaction .
    One is for materil stock in storage location is MB52 or MB5B
    THen ME2N for open PO quantity for that material.

  • Open Order Quantity for open sales orders

    Is there a standard SAP Report that gives the open order quantity for every open sales order.   "Open" is defined as any order quantity that has not shipped.  Delivery creation is not the same as shipment.   VA05 Report does not contain enough information to calculate the open order quantity for an ERP-based backlog report.

    Try VA05 schedule lines standar variant...include status fields and both ordered qty and confirmed qty. In SAP standard system order status, status A means open orders fully (Nothing shipped, everything opened). Status B means in process orders (Partially processed - shipped). Status C means complete orders (Nothing opened). As there is no delivered qty in VA05,  you need to download to excel the file and calculate the difference between both qty fields for each A and B status. That is a way to get the missing qty to be delivered or open qty as you stated.
    Hope it helps.
    Jorge Fernandez

  • Nforce 3 Platninum and 6800GT works fine for a week or so then fails to boot.

    Hi everyone,
    I have read pretty much all the posts on the forum, but none show the exact same problem as mine, as far as I can see.
    I have an MSI Nforce 3 plat mobo (with latest BIOS), which is turning out to be the worst investment I ever got.
    My specs are as follows:
    2x512MB Kingston ram
    AMD 3.5
    pixelview 6800gt
    raptor HD
    thermaltake 480W PS
    I upgraded to the nforce 3 for the 939pin socket for my AMD chip.  I had constant freezing, so my old memory I had to chuck and buy 1GB of Kingston ram.  Using my old ATI 9800pro my system was stable. Absolutely no crashes.  I decide to buy a pixel view 6800GT AGP card to upgrade.  Cool.  Plug it in, reload windows (latest WHQL drivers from NVIDIA).  Everthing is fine, for about a week.  Then bad things start to happen.  The symptoms are:
    Turn machine on, BIOS check all ok, machine does DMI listing. As soon as the "starting windows" screen comes up, the video display goes corrupt.  Either white, with diagonal lines, or windows XP logo all over the screen several times and corrupted.  The machine does boot into windows, but the screen is blank or corrupted.  I hear the windows startup sound click in.  Press the power button, shut down the machine.  Reboot.  It usually comes up fine.
    I thought initially it was the graphics card, so I swapped it out. Reloaded windows. All works ok for about a week. Then, again same problem.  Windows event viewer shows no errors.
    My question is this: can this be fixed or is it hardware incompatibility.  If so, can I fix it tweaking the mobo settings.  I have tried the AGP fast writes, didn't work.  This looks like intrinsic Hardware incompatibility, but if it is this, why does it work for a week without any problems, and then it gets worse and worse and worse.
    If this is a hardware problem, what is the cheapest way to get out of this.  Is MSI nforce 4 any better or do I ditch pc gaming all together.  I have been gaming from XT days, and I have to say, I am totally disheartened with this whole mess.  The one thing in my life that I do want control of is a bootable, reliable PC to relax with at the end of the day.  At the moment, I just shed tears as it is turning out to be a costly nightmare.
    Any help would be greatly appreciated.  My friend has offered to buy the 6800GT from me, and give me my old 9800Pro back.  Should i do this???
    Thanks guys
    John

    Hi Makisst,
    Thanks for the reply.
    System specs are as follows:
    AMD 3500 64
    MSI Neo Platinum (nforce3)
    Creative labs Audigy2 pci card
    Pixelview 6800GT AGP 256MB
    Kingston DDR400 512Mb PC3200 400Mhz x2
    MSI K8N NEO2 PLATINUM 939 pin  (MS-7025-010)
    Western Digital Raptor™ 74.0Gb 10,000RPM SATA150
    Themaltake 480W power supply.
    I have 2 extra ATA HDs, which I have not added to the system to rule those out.
    I have a DVD player (bog standard MSI) and a CD burner (not plugged in so as to rule this out).
    The only thing I have not tried is removing the sound card (audigy 2).  What is driving me absolutely nuts is that the machine works fine for a week.  Then there is a slow degrade.  First boot, scrambled screen, second boot fine.  Then a few days later, it will only boot the thrid time around.  Then after 2 weeks, it won't boot at all.
    I have tried this card in another persons machine (the 6800GT that is), and it boots fine.
    I can honestly say I have not tried playing with the BIOS settings except for AGP fast writes, as it was working fine with the Radeon 9800 pro.  I have done two full HD formats, and completely wiped the Raptor twice now. 
    I shall have a look at the BIOS settings you recommended tonight, and see if they make a difference.  I am, to be 100% honest, a little bit scared of playing with the BIOS settings, as I really don't know what I am doing.  I see that the ppl I bought the machine off have set timings in the BIOS to 3-3-8-3 (I think, I will confirm this tomorrow), so should I leave these settings?
    I shall also remove the Audigy 2 card and see what happens.  System properties show machine has no conflicts though.  It is almost like the card is not initialising correctly.  Why this happens only after 1 week though I have no idea.  This is the third time it has started happening after 1 week. 
    The only extra software loaded is Norton, Win XP SP2 and directX9.  I really have not had it stable enough to start loading extra software.  I am getting too tired after reloading for the third time in 6 weeks.
    I will let you know tomorrow either way.
    Many thanks
    John

Maybe you are looking for