How to show current year and last year sales in a WEBI Report

Hi Guys
How can show current YEar Sales in one column and Last YEar Sales in the other column based on a user prompt for the Current YEar Column.
For Example is user enter 2010 for Year how can i show a Column for Sales-2010 and Sales 2009.
Thanks

If you can modify your Universe add an object named New Object Last Year whose SQL is:( yourTableName.Year + 1)
Then in WebI create two distinct queries in your query Pane. In the first one you could do this:
Query 1:
objects: Year, Sales ... etc.
filters:   Year Equal to '1. Prompt Year'
Query 2:
objects: Year, Sales ... etc.
filters:    New Object Last Year Equal to '1.Prompt Year'
Then in your report you can drag each object on their respective columns.
If you don't want to use two distinct queries, use one like this:
Query 1:
objects: Year, Sales ... etc.
filters:        Year Equal to '1. Prompt Year'
             Or
                  New Object Last Year Equal to '1.Prompt Year'
Edited by: PadawanGirl on Jun 23, 2011 6:28 PM

Similar Messages

  • Help with report that shows Year and Last Year

    Hello!
    I want to view in a report some KPIs (Rows) and Years(Columns) but I want a specific report with a prompt, I mind, at top of my dashboard there is a Year prompt that it contains (2001, 2002, 2003….,2010) and I want to see in a report when I chose in prompt 2008 for example that my report shows me 2008 Year and Last Year (2007) and another column that indicate Diference between these years. Is that possible? Can u explain me the process to get it?
    Thank you very much!

    If you get access, create a duplicate of the Measure you wish to use in the Business Model.
    Once you have a duplicate rename to say $ Revenue Year Ago and then from the properties of the Measure, General click on Use existing logical columns as the source.
    Then select function>Time Series> Ago
    Ago has 3 inputs, select the column you want to base the measure on, the TIME SERIES Dimensions for year, and then 1 for 1 year ago.
    So your formula will look something like:
    Ago("Human Resources"."Fact - Absence"."# Days" , "Human Resources"."Time"."Year" , 1)
    Save this and copy into your Presentation layer available for use.
    Hope this helps

  • How to get current month and last month dynamically??

    how to get current month and last month dynamically
    like
    month = getCurrentMonth();
    lastmonth = getcurrentMonth() -1;
    please help
    thanks

    hi :-)
    /* depracated but can be still useful */
    java.util.Date dtCurrent = new java.util.Date();
    int month = dtCurrent.getMonth();
    int lastmonth = dtCurrent.getMonth() - 1;
    System.out.println("* " + month);
    System.out.println("* " + lastmonth);
    /* better to use this one */
    Calendar cal = new GregorianCalendar();     
    int imonth = cal.get(Calendar.MONTH);
    int ilastmonth = cal.get(Calendar.MONTH) - 1;
    System.out.println("*** " + imonth);
    System.out.println("*** " + ilastmonth);
    regards,

  • BI Query Monthly (this year and last year) vs YTD (this year and last year)

    I have a query requirement in BI to create a Query which will give me
    Sales Monthly (this year and last)  vs YTD Sales (this year and last).
    Here is an example of how the query would look:
    01/2007     01/2008     02/2007     02/2008     03/2007     03/2008     YTD 2007 YTD 2008
    Above would represent CKF's by month and YTD with Text Variables.
    Is this possible?  Obviously my problem is the number of columns that I would need, since I would not always be reporting on the same month(s).  Any suggestions (if this is possible).
    Thanks

    Hi,
    You can do it, see the following code and change as per your requirement...
    FMYEAR and LMYEAR Customer Exit variables on 0CALMONTH.  If you have any input variable then link it.
    Note:  Use Offsets for the following Variables to get 2007,2008,2009 results...
    * First Month Of Current Fiscal year comment*
        WHEN 'FMYEAR'.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                 EXPORTING
                   i_date               = sy-datum
    *         I_MONMIT             = 00
                   i_periv              = 'V3'
                IMPORTING
                  e_buper              =  zbuper
                  e_gjahr              =  zbdatj.
          CLEAR: l_s_range.
          l_s_range-low+4(2) = '04'.
          l_s_range-low+0(4) = zbdatj.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
    * Last Month of Current Fiscal year*
        WHEN 'LMYEAR'.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                 EXPORTING
                   i_date               = sy-datum
    *         I_MONMIT             = 00
                   i_periv              = 'V3'
                IMPORTING
                  e_buper              =  zbuper
                  e_gjahr              =  zbdatj.
          CLEAR: l_s_range.
          l_s_range-low+4(2) = '03'.
          l_s_range-low+0(4) = zbdatj + 1.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
    Thanks
    Reddy

  • How to show the First and Last name of the user instead of user name

    Gurus,
    We have the full email id of the user as the portal user name. Right now we are using the "Item Attributes - Current User" to show the user name. We don't want to show this anymore. We would like to show the First and Last name of the user on the Portal page. How can i do this. Please post a reply if you have some idea about it.
    Thanks
    Raj
    ---------

    I believe this is possible using the security APIs. See http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/PLSQL/DOC/PLDOC_9026/INDEX.HTML and look for person_info (Returns user information, given a user name)
    under wwsec_api
    Suggest posting any follow-up questions to the Security forum - http://forums.oracle.com/forums/forum.jsp?forum=6

  • Line Chart to Compare Current Year vs Last Year

    I am on BI 7 SP9. I need to create a line chart that shows 2 lines to compare  revenue for the current year against last year. The first line should show the revenue for the current year. The second line should show the revenue for last year. In my BEx query, I have the fiscal period values in the row and the revenue key figure in the column. Questions:
    1. How can I show 2 lines in the chart to compare revenue for the current year vs last year?
    2. There are 2 variables for the fiscal period - one for current year and one for last year. The user can enter any value range in the fiscal period variables at query runtime, but the fiscal periods for each of the 2 years must be the same. This means the number of fiscal periods that appear in the query result rows will vary (e.g.. 3 periods for a quarter or 12 periods for a full year). The user has to enter the same fiscal periods for the current year and last year variables. How can I determine the fiscal period values to plot in the line chart for the current year and then last year when the number of rows in the query results will fluctuate?
    The legend at the bottom of the chart should show JAN, FEB, MAR...DEC instead of the fiscal period values like 001/2007, 002/2007. Is there an exit I have to change to get this to work?
    Thanks for any help you can give!

    You can do it in multiple ways
    1.
    SELECT COALESCE(t1.Company,t2.Company) AS Company,
    COALESCE(t1.Sales2015,0) AS CurrentYearSales,
    COALESCE(t2.Sales2014,0) AS PriorYearSales
    FROM Sales2015 t1
    FULL JOIN Sales2014 t2
    On t2.Company = t1.Company
    2.
    SELECT Company,
    MAX(CASE WHEN YearVal = 2015 THEN Sales ELSE 0 END) AS CurrentYearSales,
    MAX(CASE WHEN YearVal = 2014 THEN Sales ELSE 0 END) AS PriorYearSales
    FROM
    SELECT Company,Sales2015 AS Sales,2015 AS YearVal
    FROM Sales2015
    UNION ALL
    SELECT Company,Sales2014 AS Sales,2014
    FROM Sales2014
    )t
    GROUP BY Company
    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

  • Last ten years and 5 years afterwards from Current year

    How can i get last ten years and 5 years afterwards from Current year in a single query which is picking data from dual.

    SQL> select add_months(sysdate, -1 * 10 * 12), add_months(sysdate, 5 * 12) from dual ;
    ADD_MONTHS( ADD_MONTHS(
    14-FEB-1996 14-FEB-2011
    1 row selected.
    SQL>
    [rep]                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Line Chart - Current Year Sales, Current year Returns, Last year Sales, Last Year Returns

    We have a report that summarises monthly sales & credits for 2 years in a group footer.   The footer is a sum of a formula in the detail section that calculates the monthly sales at the Item code level
    Item 1
    Group Footer 1     July     Aug     Sept     Oct          
    Sales Last Yr     @July_LY_Sales @Aug_LY_Sales     @Sep_LY_Sales  @Oct_LY_Sales          
    Credits Last Yr @July_LY_Credits @Aug_LY_Cred     @Sep_LY_Cred   @Oct_LY_Cred          
    Sales This Yr @July_CY_Sales @Aug_CY_Sales     @Sept_CY_Sales @Oct_CY_Sales          
    Credits This Yr @July_CY_Cred @Aug_CY_Cred     @Sep_CY_Cred @Oct_CY_Cred          
    <Curr Yr Graph1>
    <Last Year Graph2>
    Item 2
    Group Footer 1     July         Aug           Sept                               Oct          
    Sales Last Yr  @July_LY_Sales   @Aug_LY_Sales @Sep_LY_Sales @Oct_LY_Sales          
    Credits Last Yr @July_LY_Cred  @Aug_LY_Cred     @Sep_LY_Cred @Oct_LY_Cred          
    Sales This Yr   @July_CY_Sales  @Aug_CY_Sales     @Sept_CY_Sales @Oct_CY_Sales          
    Credits This Yr    @July_CY_Cred   @Aug_CY_Cred     @Sep_CY_Cred @Oct_CY_Cred          
    <Curr Yr Graph1>
    <Last Year Graph2>
    In the footer under the data, we want a 4 line graph (or 2 x 2 line graphs for this year & last year).  One line for sales for the current 12 months, and with it, a line plotting the credits, so as to see the trend over that year.  And then we want a line graphing the previous years sales and a line graphing the previous year credits for the 12 months. 
    On the data tab in chart expert, we selected the Place chart for each SHDOC.ITEM (Item number) in the footer and this is positioning correctly.  We have tried selecting "On change of shdoc.item and we have also tried For each record.  We selected on change of shdoc.item to generate the graph for each item.  We then added the 12 formula for the current year in the Show Value panel  
    In the show value panel we tried using the detail formula, the Report Area: Sum of <formula> and the Group 1: Sum Formula.  They all display as @July or @Aug which is a dependent formula used to identify the month
    We have added the above formula for each month and each value, but we can't work out how to group the monthly data into the 4 series of 4 lines (1 colour each) - Current Year Sales, Current Year Returns, Last Year Sales, Last Year Returns for the charting.  We have tried to create a graph with only 1 set of monthly data (viz, just 12 months current year sales) But no matter what options we take, we seem to get 12 line chart representing each month rather than 1 line representing 12 months.
    Can someone point us in the right direction?

    Please re-post if this is still an issue but search forums first, lots of chart questions have been answered.

  • BEx - Display current year and previous year by day on the same row

    Hello experts, need some help/suggestions on how I can accomplish the following please. 
    We have a requirement to show MTD revenue by day for the current year and previous year.  The desired result will have the following columns
    Calendar Day   |     Current MTD Revenue     |     Prev MTD Revenue
    11/01/2009       |      15,131,005                    |        15,138,668
    11/02/2009         |    15,055,345    |                        15,523,762
    However, the result is showing up as follows:
    Calendar Day   |     Current MTD Revenue     |     Prev MTD Revenue
    11/01/2008       | |                                                   15,138,668
    11/02/2008       | |                                                   15,523,762
    11/01/2009       |      15,131,005 |
    11/02/2009       |      15,055,345 |
    The number of rows for Calendar Day varies depending on the date the user selects.  We only want to display the days for the current year with the Previous Year Column on the same row. 
    Can someone please let me know how I can get the results to display on one line for each day? 
    Thanks,
    David

    I have the same issue on my end, and am interested in responses. I searched the forum and found this suggestion in another post; not sure if this solution will help, but it looks like it might. This was a response from poster RadhaN:
    RadhaN  
    Posts: 390
    Registered: 8/27/09
    Forum Points: 876 
       Re: a simple query to show sales versus last year on daily basis/   
    Posted: Sep 21, 2009 9:53 AM    in response to: Shlomi Weiss           Reply 
    HI Shlomi
    Create a virtual characteristic in your infoprovider that can calculate the day from calendar Day. In ZXRSRZZZ while adding code for this virtual characteristic use the function module DATE_COMPUTE_DAY to compute the day for every calendar day.
    For calculating Sales Current year, create a restricted ky figure with Sales as the key figure. Add 0CalDay to this RKF and create a variable for this infoobject(Eg: ZCURYEAR) that will receive input from the user for the range of dates eg: 08/16/2009 - 08/22/2009.
    For Sales Prior year, create another restricted key figure with Sales. Add 0CalDay to this RKF and add a customer exit variable. In the Customer exit code use the ZCURYEAR variable and offset it to prior year in both the upper and lower limits. This should work.
    I hope this helps.
    Thanks.

  • How to create report which includes records of current month and last 7 days of previous month.

    Hi Experts,
    I need to create a report which includes records of current month and last 7 days of previous month.
    I will get records of current month by this formula :- month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate)
    Please tell me how to add the records of last 7 days of previous Month for the same report.
    Thanks in Advance.

    Hi Ajay,
    If you have more than a year data in your database then your formula will return wrong results. ie. If your data consist of 2012,2013,2014 data then below formula will return all 8th month data irrespective of year. So, you need to check year also here
    month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate)  and
    Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate)
    Now add Abhilash second statement in OR so, your formula should look like :
    (month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate)  and
    Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate))
    OR
    Date({PROBSUMMARYM1.OPEN_TIME}) IN [DateAdd('d',-7,Maximum(LastFullMonth)), Maximum(LastFullMonth)
    -Sastry

  • How to display records based on current month and last month???

    i have a query that want to display the data for current month and last month. when i try to view the reports, all the data/key figures is return all in 0.00.
    i modify the variables for this current month and last month but still the results is the same. i could not see the data. any advise on how to modify the variables for this current month and last month? i am thinking my variables is wrong.
    for the current month variable:
    the type of variable is characteristic value, processing by customer exit, reference characteristic is calendar year/month.
    thanks for all who are kind to help me here....

    Hi,
       If you install the variables from BC correctly and they are in active state, you can use them directly use them. check for this month the total values at info cube is ZERO or some value. as you told you are getting ZEROS for your input.and check the data at cube level based on your query design, apply all restrictions, fileters and see do you get any data at cube level and compare with report.

  • Current year and previous year

    Hi All Grus,
    i have a one requirement user will give input 30.04.2009 . the output should show last ten days including user entered date like 21.04.2009 to 30.04.2009 for current year and previous year
    this current year and previous should show column wise in row wise i need year like  given below
    user input:  30.04.2009
    row            column                                                                               
    21.04.09  22..04.09. 23..04.09 ..............................................................  30.04.2009
    2009       100          200            300         ...............................................................     500                            
    2008        200          300          600          .................................................................    1000               
    Edited by: kek.uthayakumar on Aug 4, 2009 7:57 AM
    Edited by: kek.uthayakumar on Aug 4, 2009 7:58 AM

    Hi
    You need to have customer exit variable on this calday and write code to obtain your logic. Search in SDN for sample codes:
    enter information required in search forum SAP Business Explorer (SAP BEx)
    Regards
    Ravi

  • Parameter for current year and previous year

    Hi all,
    I currently have 2 reports where the query is the same except in the where clause I have it filtered to current year and previous year based on the List_Date. I would like to make this one report with a parameter of Current or Previous year.
    Would I create 2 more datasets one for current and another for previous? I would think there is a easier way. Any help or direction would be great.  

    If you define a parameter in SSRS, you can use it's value in your query. Just make sure the parameter name, and CASE (SSRS is case sensitive when it comes to parameters) are the same in SSRS and your query. There's a parameter tab on the dataset properties.
    It SHOULD auto fill, but it never hurts to check, just in case.
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.
    Yes it did auto fill the parameter tab in the dataset and I get a parameter to enter the year when I preview the report. Still a little confused on how I do current or previous year. Are the next steps what I need to do?
    @yearParam parameter:
    1) Create  Available or Default values 
    2) Current and Previous year as label
    3) For Value do I need to use a expression for current year =Year(now()) and previous Year?
    4) Add a filter on the tablix for list_date?

  • Need the first day of the year and last day of the year.

    hi all,
    i need a function module which can get me the first day of current year and last day of the current year??
    please help.

    Similar date questions are being asked ALL THE TIME.  Please search.

  • Current Year and Previou year Data comparision - Urgent

    Hi Experts,
    In our report we need to compare the sales value for current year and prevous year.
    The Fiscal year is the input selection field.
    Output report displayed as below
    Product|Current year sales|Previous year sales|
    404    |120.00          |20.00
    400    |122.00          |22.00
    Total  |242.00          |42.00
    Could any body help how do i use the fiscal year/period or fiscal year for the current sales and previous sales values.
    Thanks in advance.
    Mahantesh

    You have to restricit current year column with the variable Fiscal year and previous year colum with same variable with offset -1.
    For year period use a range with from valie '001.1990' and to value a variable for current and the same variable with offset -12 for previous.
    Hope it helps.
    Regards

Maybe you are looking for

  • All apps/programs switch to Finder on their own... buggy.

    Hello guys and gals... It's a simple but awful problem. No matter what I'm doing on my computer, any program/app I'm using will randomly switch to Finder on (it just happened while I was typing) it's own. At first I thought I activated a certain key

  • Can't print. Network Host is Busy or Unable to Connect to Printer 10.6.4

    This started yesterday. I had made no changes to my network. I get this error, and cannot print from my MacBook Pro running 10.6.5 wirelessly. I print using the IP address of the printer. (10.0.1.2) The printer is a Brother (drivers updated), connect

  • Issue with EKBE and 2lis_02_scl enhancement

    Hi Gurus, I am enhancing MC02M_SCL structure for purchasing 2lis_02_scl, I added the fields MENGE (quantity) posting date (BUDAT) and transaction value type VGABE. Transaction event type has the values 1 to 8, I am comparing the keys EBELN and EBELP

  • Chrome and firefox searches on address/URL field are crashing my Mac

    Hello, Since Friday (3 days ago), I've noticed that whenever I use the address/URL field in either Chrome or Firefox to search for something - not entering a valid URL, but entering something for the browse to use Google to search for what I entered

  • Video not playing in Premiere Elements 9

    I have Premiere Elements 9 and can't get the video clips to play. It is just black but can hear the audio fine. When I click on the preview window the video pauses and I get a still image of that point in time. If I preview from the clip section it i