Date for Month year only?

I Have a report being done where, the user wants to see the 'slow moving inventory' for a 2 month period.
It's not automatic, the past 2 months. they can select which 2 months they want. So, I was thinking of the best way for the parameters.
Maybe just have them enter one? month/year. but in any case if i do a from and to, I dont' need the entire calender- is there  a way to display just the month and year? if not i can create the parameter that way.

I would create a command (SQL Select statement) to use for data for a dynamic prompt.  It might look something like this in Oracle (allows for two full calendar years in the past):
Select distinct
To_Char(OrderDate, 'MMM-YYYY')  as MonthYear
from Orders
where EXTRACT(Year from OrderDate) >= (EXTRACT(Year from Sysdate) - 2)
Or like this in SQL Server:
Select distinct
Left(DateName(month, OrderDate), 3) + '-' + DateName(year, OrderDate) as MonthYear
from Orders
where Year(OrderDate) >= (Year(GetDate()) - 2)
DO NOT link the command to anything in the report - its sole purpose is to provide data for a dynamic prompt.  Crystal will complain that this is generally not supported, but it will work in this situation.
Now create a dynamic parameter that will use this data - DO NOT use any other data from your report tables!  This parameter will identify the start month for the report.
Lastly, you'll need to create a two formulas - one that will calculate the start date from the parameter value and another that will create the end date.  If the parameter is called {?StartMonth}, they might look like this:
{@StartDate}
StringVar monthName := UpperCase(Left({?StartMonth}, 3));
//get the month number
NumberVar mn := Switch (
  monthName = 'JAN', 1,
  monthName = 'FEB', 2,
  monthName = 'DEC', 12);
//get the Year number
NumberVar yr := ToNumber(Right({?StartMonth}, 4));
//return the first day of the start month:
Date(yr, mn, 1)
{@EndDate}
//Subtract one day from the start of the month 2 months after the start date to get the end of the
//month after the start date
DateAdd('m', 2, {@StartDate})  -  1 
Use these formulas in your selection criteria for your report.
-Dell

Similar Messages

  • Release Date for Albums Year, MONTH DAY

    Why can't I enter the release date for albums (Year month and day)?   Itunes has a field for year but that's it.    I would have loved to be at the meeting where it was discussed.
    "Year, month and day? why the heck would any want that?"
    "Well a lot of us want to see our albums in chronological order and you can't do that with just the year, many albums come out every year"
    "Blah Blah Blah, music is just to dance to, no one cares about dates, besides it would four extra digit fields in each entry"
    But seriously, I would think that Itunes would aspire to be THE program for music lovers.
    Instead of being able to just enter the release dates I have had to come up with my own work around.  I put a the release date in the format yyyymmdd in fromt of each title and then sort by titles.
    Now all of my Beatle albums finally show up in chronological order by release date.   But why should I have to massage the data like this.   I can't imagine what goes on at Itunes planning  sessions.  I'm very unhappy about the loss of cover flow but that's another story.

    I'm glad to hear that I am not the only one who sees this as a problem.  And another Beatles fan too.
    This is so fundamental.  Every album has a release date and it's part of the data that is always associated with  that album.   Why did Apple look at the data available for an album and consciously decide to truncate it?
    What kind of music lover isn't aware of when albums are released?  I just don't get it.
    I like having the date yyyymmdd in front of each album.   It isn't pretty but it means the albums are chronological.   If you want, you could just put this in the sort field and leave the regular album title in the regular field.   Then the names would be right and they would sort correctly.   But again.  Why should we have to do all that? 
    Apple is busy constantly changing where the controls are on I tunes  rather than fixing something simple and important like this.
    Today I wanted to load some songs onto my ipod touch and it took me 10 minutes to figure out how to sync because the last itunes update got rid of the side bar.  
    How are you supposed to get comfortable using a product when they keep moving the controls around?   Just quit apple.   leave the controls where they are.  Add new controls if needed but stop moving them.  I know I'm ranting now but I am honestly angry and frustrated,

  • Routine to convert the date into month/year

    Hi friends,
    I have requirement like I have 0billdate, but i want only month and year in that.  So i have created a z object  for that taking reference as 0calmonth.  I think the format is yyyymm.
    So now I want to write a routine which converts the date to month/year.  If anybody know this please let me know.
    Regards
    San Reddy

    Hi
    in the trnasfer rule or in the update rule select the Zinfo object to which you need to do conversion
    in details select formula and create.
    Select all functions and follow the steps below.
    use the conversion function DATE_MONTH( )
    Short Text
    Function: Date -> Month
    Functionality
    Calculates the month from a specified date.
    Requirements
    The date must appear in the format yyyymmdd.
    Parameters
    DATE_MONTH (date)
    Result
    The result is calculated in the format yyyymm.
    Regards
    RaM

  • How to find compensation data for the year

    Dear All,
    Scenario:
    A company wants to know the comepnsation data for financial year 2009-2010.
    Problem: I couldnot find a single report which can provide the compensation of an employee for the year.
    We are trying to build a report however needs input if anyone has done that:
    Table which stores this data is PS_COMPENSATION.
    Problem is : it stores data in effective date.
    How to then convert it into a year -April 2010 to March 2011
    For example: cases
    a. existing employee: whose effective comp data will be less than April 2010
    - Plus, there are pay rate changes between April 2010 to march 2011. (Pay rate change can happen on any date of the month)
    - How can I add them to find the Compensation as per comp page from 1st April to 31st march 2011

    I'm afraid what you're looking for is not likely to be a trivial task. If you have all of the modules required for the "Report Total Compensation" product, then you should take a look at the associated PeopleBook. I think you will have to be on HRMS 9.0 at a minimum, and using Payroll for North America and Benefits Administration.
    To create a custom solution, you may have to consider a variety of other factors such job status--leave, terminated, terminated with pay, etc.--hourly vs. salaried, part time vs. full time, multi-job, variable compensation. It will depend entirely on the specific features that are being used at your site.
    If you provide a very detailed example of the output you are looking for with sample data, someone might be willing to offer a solution.
    Regards,
    Bob

  • Calander Date format(month year)

    Hi All,
      I am using the Date format (month year, 'January 2009') to  QaaWs as a input. But when i go into Xcelsius calendar i am trying to give the same format but its not taking  as same as mentioned above( I customize the cell in xcelsius spread sheet as month year). Is there any thing to change?
    Please help me.
    Thanks in advance.
    Muvva

    The month in words datatype is FCLTX.
    If you have the date field, you can convert to your required format.
    data : out_date(20) type c.
    DATA : ws_fcmnr TYPE fcmnr,
           ws_month TYPE fcltx.
    parameter   date like sy-datum.
    ws_fcmnr = date+4(2).
    SELECT SINGLE ltx
    INTO ws_month
    FROM t247
    WHERE mnr = ws_fcmnr
    and spras = 'EN'.
    concatenate ws_month date6(2) date0(4) into out_date separated by space.
    write out_date.
    Thanks,
    Susmitha
    Dont forget to reward points for useful answers.

  • Previous years plan data for single year.

    I have 7 plan data for each year. For example for 2017 I have following ..
    what is planned for 2017 in 2011.
    what is planned for 2017 in 2012
    what is planned for 2017 in 2013.
    what is planned for 2017 in 2014.
    what is planned for 2017 in 2015.
    what is planned for 2017 in 2016.
    what is planned for 2017 in 2017.
    Client wants to store all the previous years plan relating to each year.
    I already have various category for plan such as plan1, plan2, revised plan etc.
    How to handle the above scenario for 7 years plan data. Appreciate any inputs..

    Categories named against planned year can be created. A working category(PLAN) is used in all reports and input templates. whenever PLAN data is finalized PLAN can be copied to respective planned years category . ie in 2012 , when planned data is finalized, PLAN is copied to PLAN2012 .In 2013 , PLAN should be copied to PLAN2013.
    That way , planned amounts of 2017 can be retrieved from   respective planned year categories .
    Planned amount of 2017 in 2012 is cat:PLAN2012,Time:2017.total 
    Planned amount of 2017 in 2014 is cat:PLAN2014,Time:2017.total
    Hope this helps.

  • Did anyone else get the free 1 gb of data for 2 years when preordering the iphone6?

    Did anyone else get the free 1 gb of data for 2 years when preordering the iphone6?

    I am on More Everything. Edge is actually not a plan, but an add on for financing a phone while still actually being on the More Everything Plan. Regardless, I am not using Edge.

  • Sum(sales) count for month year and week

    I have sales table : pord_id number, sale_date date
    my question: a) i need to populate sum of sales for week ie., from today to 7 days example 20-MAY-2007 to 27-MAY-2007
    b) sum of sales for month of MAY this year 2007
    c) sum of sales for 20-MAY-2006 last, only day
    Please help me with this query.. URGENT

    This..?
    sql>select * from sale;
    PROD_ID SALES_DATE
    2  02-MAY-07 
    3  03-MAY-07 
    4  04-MAY-07 
    5  05-MAY-07 
    7  07-MAY-07 
    8  08-MAY-07 
    10  10-MAY-07 
    11  11-MAY-07 
    12  12-MAY-07 
    13  13-MAY-07 
    14  14-MAY-07 
    15  15-MAY-07 
    16  16-MAY-07 
    17  17-MAY-07 
    18  18-MAY-07 
    19  19-MAY-07 
    20  20-MAY-07 
    22  22-MAY-07 
    23  23-MAY-07 
    24  24-MAY-07 
    26  26-MAY-07 
    27  27-MAY-07 
    28  28-MAY-07 
    29  29-MAY-07 
    30  30-MAY-07 
    25 rows selected.
    sql>
    select sum(case  sales_date when trunc(sysdate)  then 1 else 0 end) day_sum,
             sum(case when sales_date between sysdate and sysdate+7 then 1 else 0 end) week_sum,
             sum(case when sales_date between trunc(sysdate,'month') and last_day(sysdate) then 1 else 0 end) month_sum,
            count(*) year_sum
    from sale
    where to_char(sales_date,'yyyy') = to_char(sysdate,'yyyy');
    DAY_SUM WEEK_SUM MONTH_SUM YEAR_SUM 
    1  5  25  25
    Message was edited by:
            jeneesh
    Note: Truncated dates were inserted in the table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need to get data for month entered in  user prompt to prior 12months.

    Hi,
    I have a report where i need to display total amount for current month  to prior  12 months data...first column will be current month, second column is (current month-1),3rd col: (current month-2)....( current month-12).
    Is there any way I could use current date to get previous 12 months in  variables?
    For example: if  current date is 02/15/2010, I need get  data for 01/2010, 12/2009, 11/2009,....01/2009.
    For example: if I entered Month: 03  and year:2010 in prompt , then I need to get data for prior 12 months to that in the prompt for month:03?.

    The only way to do this is using restrictions on Universe... here you can have the restrictions for every month or a range using the user prompt and the system date.
    Regards

  • Hyperion IR : Getting out of memory error while fetching data for whole year through web client (wrokspace)

    Hi,
    While fetching data though IR wen client from workspace for a year(all 12 months) I am getting error as ("Out of Memory .Advice : Close other applications or windows and try again").
    If I am trying same through IR studio it does not give any output and show me same repoting front page.
    If i am selecting periods till 8 months it is giving the required data in both IR web client and IR studio.
    Could you please suggest how can we resolve this issue.
    Thanks,
    D.N.Rana

    Issue Cause :
    Sometimes this is due to excessive data which brings the size of the BQY file up around one gigabyte uncompressed in size (for processing may take twice as actual RAM, plus the memory space space for the plugin, and the typical memory limit on a 32-bit system is 2 gigabytes).
    Solution :
    To avoid excessive BQY size exceeding memory availability:
    Ensure that your computer has at least 2Gb of free RAM before he runs IR Studio.
    Put a limit to the number of rows that can be pulled down: Right click on Request label of Query section and put a value in Return First xxx Rows (and check the check box).
    Do not pull down more than 750 MB of data (remember it may be duplicated while processing).
    Place limits or aggregations in Query section (as opposed to Result section) to limit data entering the BQY.

  • URGENT - BI Publisher - Get Last Date of Month/Year

    Hello,
    I want to get the last date of a year/month through BI Publisher. We want to do it by creating a list of values containing the month/year name (i.e. January, February, March for month or 2004 2005 2006 for year) and when the user selects one of this values to get the last date of the month or year in order to select the correct number of records.

    Hi,
    try with a LOV like the following:
    select
    to_char(add_months(trunc(sysdate,'MONTH'),-level),'Month - YYYY') display_value,
    last_day(add_months(trunc(sysdate,'MONTH'),-level)) return_value
    from dual
    connect by level <=12
    which gives you the last 12 month from today.
    Regards
    Rainer

  • Drill down by customer only for 1 year (only total then) in query designer

    Hello experts,
    I face a need I don't manage to fit with the query designer. It sounds easy, but I didn't find solution after few trials.
    The target report has to look like that :
           01.2010   02.2010   03.2010   04.2010   u2026   12.2010   Total
    Customer    
      cust 1        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 2        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 3        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 4        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 5        ratio          ratio         ratio          ratio    ratio     ratio     Total
      cust 6        ratio          ratio         ratio          ratio    ratio     ratio     Total
    Year 2010   total          total          total          total    total      total      total
         2009      total           total          total          total    total      total      total
         2008      total           total          total          total    total      total      total
         2007      total           total          total          total    total      total      total
    The particular point disturbing me is to display detailled ratio according to customer caractéristique ONLY for the current year (2010) and ONLY TOTAL for past years.
    Thanks in advance for help, points will be awarded.
    Guillaume

    Hi Petiaux,
    All the replies have been correct & all you need to do is a combination of a few. A step-by-step approach for your report, I'll explain in detail, and please correct me if I'm wrong.
    01.2010 02.2010 03.2010 04.2010 u2026 12.2010 Total
    Customer
    cust 1 ratio ratio ratio ratio ratio ratio Total
    cust 2 ratio ratio ratio ratio ratio ratio Total
    cust 3 ratio ratio ratio ratio ratio ratio Total
    cust 4 ratio ratio ratio ratio ratio ratio Total
    cust 5 ratio ratio ratio ratio ratio ratio Total
    cust 6 ratio ratio ratio ratio ratio ratio Total
    Year 2010 total total total total total total total
    So, the above is the first set of details you need to make. Follow up by using offsets for 1 variable followed up till the 12th month. Create a variable for 0CALMONTH (Cal Yr-Month) in a selection. Follow up by copying this variable 12 times, changing the offset of the input varaible to +1, +2, etc..
    Now for the next set as below, there are 2 approaches.
    2009 total total total total total total total
    2008 total total total total total total total
    2007 total total total total total total total
    1. If you are using i/p variable as Cal-Month, then its best you can approach to find the differences by making a selection for the same variable in a range like New Var (EnterMonth -12 : Enter Month -23 ). Same fashion, approach to calculate (EnterMonth - 24 : EnterMonth-35) etc. But limitations are there for this approach, as you need to select ranges & with each year you need to update the query.
    2. Use CELL Editor: At the top of the icon tray, you can notice a 'cell' symbol, wherein you can find the cell editor. Under the 2009, 2008, 2007 headings you can choose to create a selection with following restrictions: 0CALYEAR (Cal Year) as varaible. But the only thing here is the input variable for this query must be 2 seperate variables > One CALYEAR & another CALMONTH. So this is another approach, where user will have option to enter cal month & cal year seperately in 2 different text input boxes.
    3. Perform the calculation for 2010. Copy the same for 2009,2008,2007 etc with offsets. You can try hiding the rest of the month feilds, after calculating the total for all months of the years in 2009,2008 etc using offsets. Although it sounds crazy idea, but sometimes if customers require such an output we need to do something crazy though. I hope it might work, but as stated its the last option if nothing works out.

  • 2009 rollup not showing any data for full year

    Hi forum,
    I have a structure for time which rollsup months to quarters to year in BPC. For my 2008 hierarchy I can see data in full year but for my 2009 hierarchy I can see no data coming through for full year (although I do have data in the individual months and I can see this information in BPC. Any ideas as to what could be happening ?
    Thanks,
    Brian

    Thanks for your reply Sorin.
    So for 2009 did you input correct to have 2009.Total father for 2009.Q1, Q2,Q3,Q4?
    2009.Q1, Q2 etc.. all rollup correctly and 2009.TOTAL is the father of these four members.
    What version of SAP BPC are you using?
    5.1 patch 8
    After you changed you dimension time did you process the dimension with full process? (if we are speaking about Microsoft version).
    Yes.
    We need more information because it is clear that ytou missed a step in your process.
    The 2009 hierarchy is setup identical to the 2008 hierarchy so I am confused why it should not work. Can you tell me what additional information will be helpful to diagnose the problem ?

  • Conceal data for one year in PowerPivot

    Hi,
    In the attached file (http://1drv.ms/1unwwgK), I am trying to compute the revenue for previous year .  Refer to the calculated field formula named
    Revenue2008_sec1q2
    =if(HASONEVALUE(sec1q2[Year]),CALCULATE(SUMX(sec1q2,sec1q2[Price]*sec1q2[Quantity]),sec1q2[Year]=2008),BLANK())
    I have years in the Column labels and Months in the Row labels.  While the figures are all correct, I want the figures appearing for the 2008 column to appear as blank.
    What modification will I have to bring about in the formula above.
    Please help.
    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    Hi Ashish,
    You could try something like this:
    Revenue2008_sec1q2_New:=
    IF (
    HASONEVALUE ( sec1q2[Year] ),
    IF(
    VALUES(sec1q2[Year]) <> 2008,
    CALCULATE (
    SUMX ( sec1q2, sec1q2[Price] * sec1q2[Quantity] ),
    sec1q2[Year] = 2008
    BLANK ()
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • Sql query to get Thursday (Date) for the year 2014

    Hello All,
    I want to get the date for all the Thursdays in the year 2014. How can I achieve this using SQL query? Can anybody give me a hand with this? Thanks.
    Amol

    Hi,
    Check if this can help you
    DECLARE @counter INT
    DECLARE @Date Date
    SELECT @counter = 0
    Select @Date = '20131226'
    WHILE @counter <= 52
    BEGIN
    select Thursday = convert(varchar(10),DATEADD(WEEK,1, @Date),120)
    SELECT @counter = @counter + 1
    Select @Date = DATEADD(WEEK,1, @Date)
    END
    Regards
    Prasad Tandel
    Please dont forget to mark as answer if this helps you :)

Maybe you are looking for

  • How can i be able to get the same LIST?

    im a newbei in java, and still studying about it. i hope i can ask some help from you all.^^ i really have a problem about my project, this program adds,searches and deletes the items inputted by the user. my problem is that, i cant make a connection

  • DNG Conversion Fails in Camera Download

    I've been using Photoshop CS4, Bridge and ACR for about a year.  I was sold on the Adobe rationale for converting to DNG and have been doing so using the convenient check box on the Photodownloader screen.  It has worked fine the entire time - until

  • STB Clock Display Freezes

    I have two Motorola FiOS Set Top Boxes, a standard definition model and a HD model.  The FiOS service has been operational since 2009 without any problems.  On 03/16/12, I noticed that the standard STB clock was frozen at 03:02 on a Thursday morning.

  • WebService is not invoking from OAPage

    Hi, I created a BPEL WS which creates a employee in oracle EBS and deployed sucessfully.My requirement is to invoke this WS from a custom OAF page.I generated all STUB java classes and done all coding in the controller of the page.The problem is WS i

  • Waiting for my FCP 5.1 DVDs. how long???

    Hi, I sent my FCP studio 5 DVDs to Apple a week ago and I wonder how much time it may takes for them to send the crossgrade package back to me??? any idea???