How to calculate the sales in the last month of last year

Hi all,
I have a requirement need to implement ,
the report has three columns,
MONTH----SALES----SALES2
201201----10------------100
201202----20------------100
201203----30------------100
201204----40------------100
201205----50------------100
The Sales2 is the sales of last month of last year, that is sales in 201112, value is 100.
How to realize this requirement ?
thank you in advance!!!

sorry,
I think you maybe not understand my requirement.
What I want to implement as follow,
MONTH----SALES----SALES2
201201----10------------100 (This is 201112's Sales)
201202----20------------100 (This is 201112's Sales)
201203----30------------100 (This is 201112's Sales)
201204----40------------100 (This is 201112's Sales)
201205----50------------100 (This is 201112's Sales)
201206----60------------100 (This is 201112's Sales)
If I set SALES2 =AGO(SALES,MONTH, <number of period>)
how can I set <number of period> ?
201201 should mapping to 201112
201202 also mapping to 201112
201203 also mapping to 201112
201204 also mapping to 201112
201205 also mapping to 201112
201206 also mapping to 201112

Similar Messages

  • So what do you do when you win an auction & the seller then cancels the sale & relists the item?

    So i 'won' an open auction for a watch bracelet at a cost of GBP 2.00 from a vendor on the UK site last week. Got an email saying shipping cost would be GBP 8.00.  Responded within 2 hrs with a no problem, just send me an invoice with the shipping costs included so that i can pay for the item.  Next day, seller cancelled the sale & relisted the item with a minimum price of GBP 20.00.  The seller (Margo5415) wont complete the sale claiming she "didn't think i wanted the item" ?   I protested but to no avail as it seems obvious to me that the seller felt the item would (and should) sell for far more than GBP 2.00. Matter & vendor were reported to ebay but as usual, ebay wont do anything about the sale nor penalize the seller. (Hey they make $$ off these sellers and the more it sells for the more $$ they make).  Ebay simply told me they would 'investigate' but to leave negative feedback for the seller which i did. I wont go into how many times i had to re-explain the situation to the help desk person and had to listen to them say  'dont worry, we are here to help you'.       Is there no other recourse here at all?  

    reid4311 wrote:
    .... As for carts, I never use them. If there is more than one thing from a seller I buy the first then in checkout you see view other listings and I go that way. Then I request an invoice.Are you doing this through your Purchase History? I thought Immediate Payment was required for all Buy It now listings but perhaps that rule has not yet come to ebay.co.uk.                                                                                                                                                                                                                      mikeandterri1987 wrote:I did ask the seller (before i bid on the item) if they would ship to Canada and they said yes but the postage amount would be adjusted and then they sent another email the next morning (final day of the auction) to say the postage to Canada would be GBP 8.00.  I was okay with that amount and said so in my response to them.I'm not out anything other than not getting the bracelet but it just **bleep** me off that the vendor can offer up an auction like that & then cancel it if they dont like the final sale price and simply re-list the item with no consequences other than one bad feedback. When those circumstances are clear like these were, ebay should penalize the seller.                                                                                                                                                                                                                       I agree that makes the actions of the seller all the more scatterbrained and unprofessional. For the sake of argument, what do you think would serve as adequate punishment for the seller in this case? What more should ebay do? Revoke their ability to sell altogether? Fine them? Unless ebay.co.uk is run drastically different than ebay.ca, the seller in this case would have gotten your negative feedback which gives them an embarrassingly low rating PLUS a defect from ebay for cancelling the transaction. The point of your feedback is to warn other buyers; the point of the defect is to flag them for ebay as being a risky seller. What more would you, as the wronged party in this, like to see happen? Nothing will get this item to you now unless you're prepared to pay the new price and the seller hasn't blocked you. I'm genuinely curious; the question is not intended to sound belligerent. Please don't take it as such.    

  • I am facing a problem in the sales order the purchase requistion no is not

    Hello SD Gurus,
    I am facing a prob in the sales order the purchase requistion is not coming, is there any config settings is required.
    In my bcness process after creating the SO automatically through wokflow the Purchase order will trigger.
    I have checked in the SO which is existing in the schedule line the purchase requistion is not showing.
    In the schedule line functionality is perfect.
    Other than this is it required more..............
    Gurus i am waiting for your reply.......................
    Regards,
    Kishore

    Hi kishore
    Firstly in VOV6 select the schedule line CS and check wheather in that schedule line the following data has been maintained or not
    Document type : NB
    Item category :    5( Third party)
    Account assignment category : X (  Account assignment )
    Secondly go to VOV7 and select the item category TAS and check the following data
    Automatic PO generation has been checked on or not
    Billing relevance should be F
    Regards
    Srinath

  • How to calculate overwrighting commission to the third party

    hi,
    sap gurus,
    here is the scenario:
    my sold to party is different
    and
    ship to, bill to and pyr is different.
    but
    the order will be on sold to - ie on third party.
    and
    the rest are the same ie - delivery, billing, payment is from the party to whom we have delivered, billed, and paid.
    and
    after the party paying the full amount then we have to
    calculate over writing commission to the party ie sold to.
    how to calculate that commission.
    hint: we hav to think from Partner Determination Procedure perspective and requesting to find a solution for that.
    this is specifically only TRANSACTION SPECIFIC.
    BUT NOT PERIOD SPECIFIC.
    help me on this.
    regrds,
    balaji.t
    09990019711
    and

    Hi
    yopu can make use of existing query in APD and update a Direct Update DSO and then a cube , then u can define your new query on the new Cube with required Keyfigure values .
    Rajesh

  • How to calculate start date of the week based on week number ?

    i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
    Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
    we can calculate the week number by select to_char(sysdate,'ww') from dual.
    DO we have a single line query for that or will it require writing a pl/sql block ?

    you can try following query
    it can be as inline but for more clean look and create it as select with include select
    with t as
    (select sysdate as dt from dual)
    select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
    -- get day from prev year with the same week number
        case
               when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
                dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
               when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
                dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
               else
                add_months(dt, -12)
           end as prev_year_dt
      from t) t1good luck
    Sergii
    'Monday' is not first day of week in 100% ;)
    Edited by: Galbarad on Jul 30, 2012 11:00 PM

  • How to calculate table size given the structure.

    Today i was asked how to estimate the size of the table given th transactions,.
    table has 90 column all varchar(10)
    How to calculate the size of table which has no data.
    Message was edited by:
    Maran.E

    hi,
    SQL> create table test as select * from all_objects ;
    Table created.
    SQL> create table test1 as select * from all_objects where 1 = 2 ;
    Table created.
    sql>select segment_name,bytes/1024/1024 "size", blocks
    from dba_segments
    where segment_name in ('TEST','TEST1')
    SEGMENT_NAME
          size     BLOCKS
    TEST1
         .0625          8
    TEST
             6        768regards
    Taj

  • How to calculate a date in the future and set it as field value?

    I'm trying to set the value of a read-only field to a date and time 72 hours from the current date and time. Here's how I'm doing it now:
    var futureInMilliseconds = new Date().getTime() + 259200000; // current date and time + 72 hours in milliseconds
    field.value = new Date(futureInMilliseconds);
    The field is formatted as "m/d/yyyy h:MM tt". When I test this in the debugger I see it listing the correct date and time in the future, but the value applied to the field is always the current date and time. So, I'm having a difficult time getting this to work for something that should be fairly straight forward and simple. I'd appreciate any suggestions.

    What is the "field" object?
    What happen when you use "event" for the object and not "field"?
    Even if this script is placed at the document level or any other location, it is still a calculation. It just not a field Custom Calculation Script. You are adding one value to another to get a new value.

  • How to calculate current sale price like VA01

    Hi,
    I am developing one report, in which I am showing open sales order.
    Now, I wanted to calculate the current sales price from pricing procedures and conditions. Means I need the current sales price of the Item, like I am creating the new sales order today,
    Client wanted the difference between the sales order price and the current price.
    How can I get the current sales price, any Function Module for that?? Or I have to manually take all prices from condition tables and KONP, and calculate?
    I need a Function Module instead to code like..........
    Standard SAP pricing is try to get the price from top to down pricing hierarchy, if 1st level not find, then base on the combination of next level, try to get it,
    if no found, just keep going until reach the last pricing Level ( if found on any level then it will skip & pick up that price )
    For example
    ZPR0 has 3 Level
    Sales Org/DC/Currency/Customer/Material/Stor.Location
    Sales Org/DC/Currency/Customer/Material
    Sales Org/DC/Currency/Material
    If the combination of 1st level no price there, there it will go to the 2nd level until it reach the end.
    Thanks,
    Chetan Shah

    Hi,
    The Procedure for calculating MAP is :-
    Case 1 :- PO at different price
    If in Material Master your MAP is 0.8GBP & closing stock of 30Nos, value is 24GBP
    In PO if the price is 0.9GBP & qty is 10nos, then after Goods Receipt Total Value of the GR i.e. Qty * Price + any other delivery cost will be added to the material stock value.  Qty is also updated.  New Total Value / New Stock Qty will be MAP.
    In this case Qty received 10 & price is 0.9 that means value would be 9GBP.
    Total Value becomes 24GBP (Present Stock) + 9GBP (Goods Receipt) = 33GBP
    Total Qty becomes 30Nos + 10Nos (Goods Receipt) = 40Nos
    MAP becomes = 33GBP / 44Nos = 0.75
    Case 2 : Invoice Posting (MIRO) at different price than PO
    While doing MIRO is we post at different price system will check whether sufficient stock posted in GR is available.  In the above case it is 10Nos,
    If it is there, then the above logic as in case 1 will take place
    If not available, to the extent of stock availability system will post the different value & adjust MAP & remaining is posted to Price Difference Account.
    In your case it would be like this :
    1. MAP 0.8 for 30Nos (Value would be 24GBP)
    2. Invoice Posting 1.74GBP for 1No.  That means value would be 24GBP + 1.74GBP = 25.74GBP
         Qty would be 30+1 = 40
         MAP = 25.74 / 40   = 0.64GBP
    Hope this clarifies your doubt
    regards,
    JP

  • HOW TO CALCULATE NET SALES AND CONTRACT PRICE?

    Dear experts,
    I have the requirement of sales price report
    the report layout should be
    Prod descr    material Number   Contract type  contrcat name     rebate  net sales  contract price  units
    we have the master data information is reside already in multiprovider and transaction information how to calculate in frond end ?
    for sales  pricing report how to manipulate teh net sales and contract  price
    value?
    any standard formulaes is there?
    plz suggest  me
    regards

    Hi,
    For quick and best response unless someone answer's in this forum, post your question in SAP Community Network Forums » SAP Solutions » ERP - Sales and Distribution (SD) General   or something related to your question.
    Check this link if it helps -
    http://help.sap.com/saphelp_46c/helpdata/en/93/74353e546011d1a7020000e829fd11/frameset.htm
    Thanks,
    Shambhu.

  • Getting the data for last month of every year

    Hi,
           How to declare the date if we want to pull the data from the December of every year.
    For example if the query is run in march 2015 and they want the historical data it should pull only the data from dec 2014.
    In the same way if they ran the query in future jun 2016 and if they want to historical data it should pull only data from dec 2015.
    It should not coded manually. Please help me with date format that need to used.
    BALUSUSRIHARSHA

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    A table has to have a key to be table.  Here is my guess at a repair job: 
    CREATE TABLE Test_Data
    (pu_id INTEGER NOT NULL
      REFERENCES PU(pu_id),
     pu_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL,
     PRIMARY KEY (pu_id, pu_date),
     x_count INTEGER,
     y_count INTEGER);
    Identifiers are not numeric in a good schema. What math do you do with them? They are also the key in the table that models the entity they identify. Where is the PU table (and what is a PU anyway)? 
    INSERT INTO Test_Data
    VALUES
    (28, '2014-01-01', 10, 20), -- crap! No key in this mess!! 
    (28, '2015-01-01', 30, 20), -- 
    (28, '2014-12-12', 10, 20), 
    (28, '2015-02-02', 10, 20);
    A PIVOT is not a query and not even part of SQL. It is how Microsoft programmers who do not know RDBMS or have a report writer violate the tiered architecture of SQL. We also do not use XML mixed in SQL. It is a bitch to maintain, has poor performance and again
    violates the tiered architecture principle. 
    A query is not sorted because it is a table. A file in COBOL can be sorted and that seems to be what you really want to write. 
    Old COBOL love the Sybase CONVERT() string function to avoid SQL temporal data. 
    We never use SELECT * in production code; Google it. Not only are you generating code, you are generation bad code. 
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Month_Periods
    (month_name CHAR(10) NOT NULL PRIMARY KEY
       CHECK (month_name LIKE <pattern>),
     month_start_date DATE NOT NULL,
     month_end_date DATE NOT NULL,
      CONSTRAINT date_ordering
        CHECK (month_start_date <= month_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    This will port and waste time calling string function row by row. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How can I retrieve last month and last mont -1?

    Hi guys, I am finishing to build a complex SSIS package, the last task is pretty simple but I'd like you to suggest the better solution in terms of performance (table with millions rows). The task is to create two table, one with the last update (archived)
    and one with the last update -1 (the update is done monthly) taking the data from an huge table (create by the package).
    The DDL (sample):
    create table forum (runner varchar(20), race varchar(20), nmonth varchar (6), archived datetime2)
    insert into forum values ('Zabres','Poland Red Bull','201411','2015-01-26 11:37:02.6870000'),
    ('Reynolds','Poland Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Greefer','Poland Red Bull','201411','2015-01-26 11:38:04.6870000'),
    ('Zabres','France Red Bull','201411','2015-01-26 11:38:10.6870000'),
    ('Reynolds','France Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Greefer','France Red Bull','201411','2015-01-26 11:36:02.6870000'),
    ('Zabres','Poland Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-31 16:26:02.6870000'),
    ('Greefer','Poland Red Bull','201411','2014-12-31 16:26:14.6870000'),
    ('Zabres','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Reynolds','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Greefer','France Red Bull','201411','2014-12-31 16:22:02.6870000'),
    ('Zabres','Poland Red Bull','201411','2014-12-11 10:30:14.5870000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-11 10:31:10.5550000'),
    ('Greefer','Poland Red Bull','201411','2014-12-11 10:31:14.3560000'),
    ('Zabres','Poland Red Bull','201411','2014-12-11 9:11:14.4420000'),
    ('Reynolds','Poland Red Bull','201411','2014-12-11 9:11:54.7760000'),
    ('Greefer','Poland Red Bull','201411','2014-12-11 9:11:55.7860000')
    The tough thing is the format of archived. How can I take the last month and, especially, the last month -1 without caring about the seconds and milliseconds ?
    The expected is LAST MONTH
    LAST MONTH -1
    Many thanks in advance

    Yes! Your solution looks better, even in terms of performance (242 sec mine, 202 sec yours). Now I'm wondering the same, shall I upload the elements only once per month? What if I got more upload in one month?
    You can also upload it once per week
    In which case query would be like
    SELECT *
    FROM forum
    WHERE archived >= DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0)
    AND archived < DATEADD(wk,DATEDIFF(wk,0,GETDATE())+1,0)
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to calculate PR converted to PO this month

    Hi experts,
    Can any one guide me on this issue both modelling and reporting.
    Selection Parameter from table EBAN u2013
    Plant (WERKS) u2013 As per selection criteria entered by the user
    Processing Status (STATU) u2013 B
    Release indicator (FRGKZ) u2013 2
    Requisition Date (BADAT) u2013 01.09.2009 to Last Month Date as entered by the user.
    Based on above select query fetch all the PO numbers for each of the PR from table EBAN.
    Then filter from above fetched POu2019s from table EBAN based on below selection criteria from table EKKO u2013
    Company Code of Plant  (BUKRS) u2013 Company Code of Plant entered by the user
    Created on (AEDAT) - 01.07.2010 to 19.07.2010 (If user is executing report on 19.07.2010)
    PR converted to PO this month = Count of the PO filtered based on above selection criteria
    Regards
    Rk

    Hi,
    I am bit confused with your requirement.
    EBAN table is for PReqs. In EBAN table if you put STATU (Processing status of purchase requisition) as B then you get all the PReqs which got converted into POs. So this will provide you the number of PReqs converter on POs for given date selection.
    If this is your requirement then staging of EBAN will satisfy your need. Just check how you are providing seletions for date/plant in report.
    If you want to display same data from EKKO table as well in report or you want to filter some values on the basis of data in EKKO field then you need to stage EKKO as well.
    Now question how to model this?
    As you said 1. Create Infoset of cubes in BW 2. Create a View in R/3
    Both are same approach as for both you need to create one join (Infoset or View) now question is that how to join both tables or Cubes. I don't think is there any key on which you may join both because in both the tables key is PO number and PReq number. Both are seperate from each other so we can not join both unless we have some link. The link is available in EKET table so we need to stage that as well.
    If you can provide the filed list and filter conditions in required report then we can think of better option.
    I hope it will help.
    Thanks,
    S

  • How many hosted web response forms allowed per month or per year with monthly and yearly plans?

    I am trying to pick out the right membership plan for us and the monthly plan and yearly plan allow a ceretain number of forms, however the membership materials do not clearly state how many hosted web response forms are allowed in each plan whether it is monthly or yearly? I need the answer before we decide

    With the Basic plan you can have up to 5 online forms at any given time. There is no quota per month or per year. If you need to create a another form after your reached the quota then just delete one of the other form first. There is no quota for the Plus plan.
    Same is true for the maximum responses. You can always export and delete responses to receive more if you have reached the maximum number of responses the plan allows.
    Not that the Plus plan comes cheaper per month than the Basic plan but this is because you get a discount for commiting for the whole year.
    Gen

  • XSLT Mapping: how to calculate Week number of the year from given date

    Hi,
    I  have input as date, i need to know the Week number from that date in XSLT Coding.
    for Eg: if date is 29-12-2009 it should give 53rd week of the year.
    All answers will be appreciated.
    Regards,
    Mayank

    Hi add this statement to your XSLT Mappping
    <xsl:stylesheet version="1.0" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="java">
    and use <xsl:template name="GetDateInLocal" xmlns:cal="xalan://java.util.GregorianCalendar"> in XSLT Mapping , write your logic.
    cheers,
    Raj

  • Adobe has staff that check the sale of the Add ons Muse?

    I bought the Scrolly application of the company QooQee Muse Templates, but what is my surprise gave me "Skype chat" I don't want it, I need the Scrolly application.

    Please upload some screenshots which would help.
    Are you trying to preview page in browser and then you get skype icon in front of numbers etc ? If yes then its your browser where skype plugin is installed.
    But if you are referring to a skype chat options in template itself , then you can delete that if you don't want it.
    Thanks,
    Sanjit

Maybe you are looking for

  • What is "normal URL's load"? How does one do this?

    I osted that my pwerbook showed 4 bars (wireless) but said I was not connected. I have had man, many problems with my MBP regarding connecting to the internet wirelessly. iVmichael was kind enough to give the following response: "That URL throws an e

  • Connecting new iPod Touch to stereo or car using 1/8" auxiliary cable

    I am having troubles connecting my new iPod Touch to my stereo and car using a 1/8" auxiliary cable. I plugged the cable into the headphone port on the iPod Touch (just as I always do with my iPod nano) and no sound comes out. The headphone port work

  • Refreshing a set of JPanels

    Hello there, I have an issue with refreshing and replacing my JPanel colors. As you can see, the format is GridLayout with the size of the grid changing based on what file they open. My issue is that when a second file is opened, it merely adds those

  • Nikon s4100 HELP

    Is any one elses camera take dark images, if so how did you fix it. It was fresh out of the box taking blurry and dark photos, even with the flash on... is this a defect or can someone tell me how to change the resolution, which i have tried but i do

  • Text Editting

    I want my text to touch.  I'm trying to create a logo inside a circle, and I want the letters to touch, as I then plan on doing a clip mask so the letters have a picture on them.  I also want the letters to outline the circle.  i'm managed to warp th