Getting Previous year Data

Hi,
My db has following:
Year Sales Target (10 % more of Previous year's Sales)
2007 10000 -
2008 15000 11000
2009 18000 19500
2010 20000 19800
2011 10000 22000
I have a filter set to retrieve data for Current Year and (Current - 3) years, and I get following
Year Sales Target (10 % more of Previous year's Sales)
2008 15000 0
2009 18000 19500
2010 20000 19800
2011 10000 22000
I want to display the value (Target) for 'Year 2008' (as the previous year sales data is present);
Is it possible to get it?
Regareds,
Jitendra

Matt!
Would you please explain, how to achieve this in Pivot?
Regards,
Jitendra

Similar Messages

  • Previous Year Data in Crystal Reports

    Hi Experts,
                      I need to generate crystal report with current year sales data, and previous year sales data.
    How to get previous year sales data in crystal reports (Here am Using BEX Query as a Data source).
    Please do need ful

    Moved to BEX forum

  • Not getting Last year data in query

    Hi All
    i have created one query on cost element cube.i have two col in the query i.e amount(present year) and amount (past year).
    For getting the past year data I have set the offset -12 for the fiscalyear/ period variable in the query i also restricted the fiscal year variant v3 in the amount. but i am not getting the corect value  for the past year . if i run for 2011 and 2010 for the same period i am getting right value in Amount(present year) but if i run the query for 2011 for same period i am not geting right value in amount previous year data. Kindly help me how to  get right data.

    Hi Atul,
    There are certain restrictions when you are reporting over multiple time frames,
    1) You should not put the global restriction of the time period on which you want to display data e.g. 0CALMONTH or 0FISCPER etc.
    you can put the global restriction but it should be at high granularity. for e.g. when you are reporting on Present month and last month then you can put restriction on Year, here you should take care when you are giving input as first month then last month of previous year data will not be displayed untill year is restricted for current as well as previous year.
    Another thing is
    2) You should not put time characteristic in drill down otherwise data aggregation doesn't happen.
    If you want to take any time characteristic input then it should be included in the specific RKF only, though Input ready variables.
    Regards,
    Durgesh.

  • How to get previous day data if i dont have current day data.

    Hello Gurus,
    I have a stock levels data in ODS. when there is no movements, we are not getting any stocks into ODS. So we have to get previous day data as it is for current day data into another ODS.
    Could you please help me in this regard.
    Thanks in advance,
    Rama

    Rama -    
            0CALDAY can't help us in this scenario .
    Step 1 :
        To do this - You have to add one ZDATE (InfoObject ) to 1st ODS. ZDATE is updated by itself from current date of system  when ever you are loading data to 1st ODS.
    Step 2:
       You have to do full update to 2nd ods.At the selection screen of InfoPackage  (from 1st ODS to 2nd ODS ) you have to write following code for ZDATE.
    pseudo Code:
    1) Select fields "Rec_INSERT","Time stamp","Request Status" and "Request ID"  where ICUBE = ODS1 from table "RSMONICDP"
    2) Populate above selected fields data in INTERNAL TABLE
    3) Sort INTERNAL TABLE by Time stamp .
    4)
         If (Record Count = ' 0 ' for current date in internal table )
         update records from  ODS1 to ODS2 where ZDATE = "yesterday date"
         else
         update records from ODS1 to ODS2 where ZDATE= "today date"
         endif.
    Make sure this is full update not delta update from ODS1 to ODS2
    I am sorry, I m not good in Coding but I am sure if  u use this logic,You can meet your requirement.
    I hope you can understand my logic. Let me know if you have any questions,
    Anesh B .

  • Capturing previous year data

    Hi ,
    I've the data something like this :
    Fiscal Year     Fiscal Period     Metric     Inventory
    2001             January             Auto            3160561.67
    2001             February        Auto            2962785.92
    2001             March             Auto       3451301.7
    2002             May                     Auto       3319819.79
    2002            June                     Auto             3972317.49
    2002            July                     Auto             3743610.69
    2002            August             Auto             3772486.83
    I've a combo for fiscal  year and based upon the year selection its data is displayed in a Pie chart
    and when I select a particular fiscal year its previous year data and selected year data should be displayed in a pie chart.
    How to capture previous year data?
    Thanks
    Ram

    Ram,
    I will share the sample xlf file, you can contact me through my profile.
    -Anil

  • Get previous bill date using SQL

    Hi,
    I am table which holds records for bill generation. I have column name gene_bill_date which is date field and it holds a value the date on which the particular bill was generated.
    Now I am trying to get previous bill date, not the current bill date. I can to Max(gene_bill_date) to get current bill date, but how do I get previous bill date?
    thanks

    Hi,
    Sorry, it's unclear what you're asking.
    You didn't post any sample data, so I'll use the scott.emp table to illustrate. Let's say we're interested in deptno=30 only, just to reduce the output from 14 rows to 6.
    If, for every row, you need to know the most recent gene_bill_date before the one on that row, you can do something like this:
    SELECT     ename
    ,     hiredate
    ,     LAG (hiredate) OVER (ORDER BY hiredate)     AS prev_hiredate
    FROM     scott.emp
    WHERE     deptno     = 30
    ;Output:
    ENAME      HIREDATE    PREV_HIREDA
    ALLEN      20-Feb-1981
    WARD       22-Feb-1981 20-Feb-1981
    BLAKE      01-May-1981 22-Feb-1981
    TURNER     08-Sep-1981 01-May-1981
    MARTIN     28-Sep-1981 08-Sep-1981
    JAMES      03-Dec-1981 28-Sep-1981Are you only interested in the 2 most recent dates in the whole result set?
    If so, do a Top-N Query , like this:
    WITH     got_r_num     AS
         SELECT     ename
         ,     hiredate
         ,     RANK () OVER (ORDER BY hiredate  DESC)     AS r_num
         FROM     scott.emp
         WHERE     deptno     = 30
    SELECT     *
    FROM     got_r_num
    WHERE     r_num     <= 2
    ;Output:
    ENAME      HIREDATE         R_NUM
    JAMES      03-Dec-1981          1
    MARTIN     28-Sep-1981          2 
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using.

  • What is the best way to get Previous Year calculations?

    Hi. I am having trouble building Previous Year calculations in OBIEE 11g. The "Ago" function is not working for me. At my company previous year is defined as Date - 364 (not Year - 1).
    Here is an example of the Answers report I am trying to build:
    Division    Store    Week    UPC     ItemQtySold     ItemQtySold-LY
    Because I am building my Ago function at the Day level, and reporting at the Week level, it is not working properly.
    Does anyone have any suggestions?
    Thanks,
    Mike

    Hi,
    Just create an evaluation tenate and get your hands Dirty! Or if you are a partner to Microsoft, you can register yourself at
    http://portal.fasttrack.office.com and then you can create sites from there. If you need tenant with data, use
    http://microsoftcie.com and create a tenant, then you will have your own contoso to play with! :) 
    Regards
    Henrik A. Halmstrand
    sharepointrevealed.com
    getspconfig.codeplex.com
    Please click Mark As Answer; if a post solves your problem or Vote As Helpful; if a post has been useful to you.

  • Get previous year from leap year

    Hi all,
    I'm stuck here trying to get the previous year for the current year, I tried these function module but didn't work, CCM_GO_BACK_MONTHS and CALCULATE_DATE.
    The problem is, in the leap year, there's Feb 29th, so I want to get 1 year before the date I enter, 2008 is a leap year, when I entered feb 29th 2008, then used the FM, then it showed me Feb 29th 2007, but 2007 doesn't have Feb 29th.
    Any advice? thanks!

    Try                                                                               
    /SAPNEA/J_SC_CALENDAR          Calendar
    /SAPNEA/JSC_LEAP_YEAR          Leap year check between two date
                                                                                    EAU0
    ISU_LEAP_DAYS_BETWEEN_2_DATES
                                                                                    FF04
    FIMA_LEAP_DAYS_BETWEEN_2_DATES
                                                                                    FV02
    LEAP_DAYS_BETWEEN_TWO_DATES                                  
    You can also look at class "CL_HRSEN00_LEAP_DAY_TOOLS"
    ^ Saquib

  • Fetching previous year date

    how can i write a query to fetch date for the previous year, given any date inputted by the user ?
    (Datatype will be date)

    Yes, you can make the change in the query. But that would require that the query returns a string, not a date. I showed a couple replies ago how to add a TO_CHAR call to return a string in a particular format.
    If you want to return a date, you have to accept that a date has many valid display formats. It is up to the client to determine how to make the date human readable. If the client is SQL*Plus, the client application defers to the individual user's preferences as expressed by the NLS_DATE_FORMAT. That is incredibly useful behavior since preferred date formats are culturally dependent. A European will read the string '3/6/11' as June 3, 2011 while an American reads it as March 6, 2011. Honoring the NLS_DATE_FORMAT makes it easy to let every user see dates in the format they prefer.
    Justin

  • FM to get previous sunday date based on current date(SY-DATUM)

    hi all,
    Is there any function module to get the previous sunday date based on current date(sy-datum)?
    Regards,
    Kapil Sharma

    Hi Kapil,
    You can follow the logic below:
    data:
    l_date like sy-datum, **TODAY
    l_date2 like sy-datum, **Previous Sunday
    data:
    l_daynr like HRVSCHED-DAYNR.
    *Get today's date
    l_date = sy-datum.
    *Gey today's day (Monday, Tuesday, etc.)
    CALL FUNCTION 'HRIQ_GET_DATE_DAYNAME'
    EXPORTING
    langu = 'EN'
    date = l_date
    IMPORTING
    daynr = l_daynr.
    CASE l_daynr.
    *If it is Monday
    WHEN 1.
    -Subtract 2 days for the previous Sunday
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 2
    IMPORTING
    ed_date = l_date2.
    *If it is Tuesday
    WHEN 2.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 3
    IMPORTING
    ed_date = l_date2.
    *If it is Wednesday
    WHEN 3.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 4
    IMPORTING
    ed_date = l_date2.
    *If it is Thursday
    WHEN 4.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 5
    IMPORTING
    ed_date = l_date2.
    *If it is Friday
    WHEN 5.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 6
    IMPORTING
    ed_date = l_date2.
    *If it is Saturday
    WHEN 6.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 7
    IMPORTING
    ed_date = l_date2.
    *If it is Sunday
    WHEN 7.
    CALL FUNCTION 'HR_SEN_CALE_DAYS_DATE'
    EXPORTING
    id_date = l_date
    id-operator = '-'
    is_duration = 8
    IMPORTING
    ed_date = l_date2.
    ENDCASE.
    Regards,
    Dilek

  • How to generate a new calendar without previous year data

    In iCal I previously could, at the end of the year or early in the new year, create a new complete calendar and delete the old data of the previous year leaving only the current year entries. Ever since there was an iCal, I was able to do that.
    I think I created an archive for the previous year and then was able to delete the old daily data in a single step to create the new year. There doesn't seem to be any capability to do this.
    I have created an archive of my 2012 events but don't want to manually delete hundreds and hundreds (probablty over a  thousand) of 2012 entries one by one just to make a calendar with only the few days of 2013 presently in my calendar.
    I do NOT use the cloud to store my calendar or any of my information. If that might be the only way to purge old data, then there is a big flaw in Calendar.

    I found information on how I created a clean Calendar in January of 2012 when using an older version of OS (probably Lion) and Calendar.
    Selected backup option (now only have export or archive as available options)
    set prefs to clear older than x days (no options now possible to do this)
    create copy
    close Calendar
    repopen and unchecked the prefs
    I have now created a new calendar by the extremely tedious process of deleting over 1000 entries in the 2012 calendar one at a time.
    This is a really big flaw in the current Calendar not allowing the easy creation of a new Calendar as was possible just a year ago!!!!! This was possibe every year since we got iCal until now.

  • Getting previous weeks data based on parameters entered

    I am using CRXI. I have a RT that gives me the current week data but I need to be able to report on previous week data based on the paraments so if I enter dates between sunday and saturday of one week it will report on those data plus the same days of the previous week. I looked at the lastfullweek function, but not sure how to implement it in my scenerio. any ideas?
    Ralph

    That worked, thankyou. My next question along the same lines, is I am also having a third column that will indicate the percent change. for example
    Current             Previous              % Change
    97                    108
    I am trying to computer the % change between curent and previous basically it would look at previous as being the control and computer positive or negative based on what current is. I can do the math formulas, but I'm not sure what to comute to find the % change.
    Ralph

  • How to get previous month data from current month values

    Hi Experts,
    I have made one universe from BW Query in which Fiscal year period is entered in interval.
    I have made a universe from that and want to develop webI reports on top of that.
    In my webI reports, i have used one cross tab. In Rows section i have added Company Code and in Column section i have used Fiscal Year/Period and in Value section i have added Sales Value. I want this value of previous month.
    Requirement:
    Ex.
                            Feb'09          Mar'09     and so on...
    Comp_code1   Sales of Jan'09         Sales of Feb'0f         and so on....
    I am getting this.
    Ex.
                            Feb'09          Mar'09     and so on...
    Comp_code1   Sales of Feb'09         Sales of Mar'09         and so on....
    I hope i have clear my requirements.
    Please help as soon as possible.
    Thanks in Advance,
    Rishit

    Hi Rishit,
    Follow the below steps to get the desired result.
    Step1: Convert your fiscal year period from char to a date in your database or in your designer however its feasible.
    to_date('substr('009.2009',2)','mm.yyyy')
    you will get the result 01 sep 2009
    Step2: Convert this format to 01/09/2009 by using date functions.
    Step3: Create a Detail associated to the 'date' field (typically your fiscal period).
    Step4: Create a cross tab Like : Rows section should have Company Code and in Column section should have 'date'(created detail) and in Value section should be Sales Value.
    you should get the following result.
    01/02/2009 01/03/2009 and so on...
    Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
    Step5: Use the following formula in your Column (date) formula bar.
    =(<date>-1)-DayNumberOfMonth(<date>-1)+1
    You will get the following result:
    01/01/2009 01/02/2009 and so on...
    Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
    Format the cell according to your reruirement.
    Let me know if you will get any break in the above steps.
    Regards,
    Swati.

  • Getting Previous Period Date

    Hello - I'm wondering if anyone can help.
    Im currently developing a tool which filters and aggregates some data. I have the user to be able to select a period for example - 01/01/2010 to 07/10/2010.
    Then, I want to compare the selected data with the same period of the previous.
    I understand that I think I get do this with the .getTime function but Im at a loose end as to how to achieve this. Another example is if the user selects 2 years, e.g. 01/01/2010 - 01/01/2008 the comparison period would be 01/01/2006 - 01/01/2008
    Please help!
    Thanks
    Craig
    public function filterAll(evt:Event):void
                    var tmpDate:Date = selectedFrom.selectedDate
                    var tmpDate2:Date = selectedTo.selectedDate
                    tmpDate.time = tmpDate.getTime();
                    tmpDate2.time = tmpDate2.getTime(); // this needs to be the previous period
                    trace (tmpDate)
                    trace (tmpDate2) // trace previous period

    Think I've done it! Here is the function for anyone that is interested!
    public function getPreviousPeriod(From:Date,To:Date, fromOrTo:String):Date
                    var diffNum:Number = From.getTime() - To.getTime();
                    var tmpDate:Date = new Date
                    var tmpDate2:Date = new Date
                    tmpDate.time = From.getTime();
                    tmpDate2.time = To.getTime();
                    tmpDate.time = tmpDate.getTime() + diffNum
                    tmpDate2.time = tmpDate2.getTime() + diffNum
                    if (fromOrTo == "From")
                        trace ("FROM")
                        return tmpDate;
                    else
                        trace ("TO")
                        return tmpDate2;

  • Previous years' data

    Hi Gurus
    We are on SAP 4.7 in a post go-live environment with only FI & CO modules.
    My client has just been demerged from its parent company. In the old organization, my client was a company code too. We have done the configuration as it was in the old organization & the client is using the new configurations & have completed 3 month-end closings.
    At the time of go-live, we did all the initial postings for GL, AR, AP & Assets. The uploads were fine & without errors.
    Now, the client wants to import all the data from year 2002 onwards with the document numbers / check numbers etc. intact in the new production server as the parent company would be prohibiting access to the old server. In short, the client expects us to transfer all the data in an as-is manner from the old server to the new server without compromising on the document numbers, check numbers etc.
    We are writing a BDC using FB01 to transfer all the data from 2002 onwards. We made the account document number as external as the client wants the entire data in an as-is manner. Is there any functional module or BAPI using external number ranges by which we can carry out the postings? We tried with the standard FM but it gives an error due to external document numbering.
    Regards,

    very bad idea to transfer old FI-documents
    Better us an archiv-solution like <a href="http://www.pbs-software.com/PBS-Startseite.1.0.html?&L=1">PBS</a>
    hope that helps
    Andreas

Maybe you are looking for

  • How to enable TCP Wrappers with SMF services?

    I am using a site.xml file to enable/disable services during a Jumpstart configuration. This works great. However, I can't yet figure out how to configure the various properties of those services, such as enabling TCP Wrappers for a service. I can se

  • Service Order and Sales Order Integration

    Hi All, Through the requirement class settings in customizing, I have managed to generate a service order in the background upon creation of sales order. To achieve this I have maintained the following settings: Order type = OR Sales document item ca

  • 8i Installation

    Can I install 8i EE on a workstation installed edition of Redhat 6.1, or does 8i EE have to be installed on the Server installed edition of Redhat. I want to be sure I have the ability to create Databases.

  • Expire password - alter user - privilege authid

    Hello to all I need to allow the users of Data base, that when the password expires, can enter the new password from a page. What I am trying to do is to add a function to modify the user create function usu_mod as begin execute immediate 'alter user

  • Query needed pls - urgent

    Hi all, I have three tables. Data present in them are below: Data for Files table: File_ID File_Name File_Type File_Short_Desc File_Desc File_Str_Pos File_Str_Len 1 File1 K Desc 1 Description 1 12 15 2 File2 K Desc 2 Description 2 14 16 3 file3 G Des