Filter on a Report to display  records only  from last 12 months

Hi Folks,
I have a requirement where I have to display Records for last 12 months. Following is the Filter that I am using
Opportunity."Close Date" >= TIMESTAMPADD(SQL_TSI_MONTH, 0, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)-1), CURRENT_DATE)) AND Opportunity."Close Date" <= TIMESTAMPADD(SQL_TSI_MONTH, 12, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE)), CURRENT_DATE))
But this is showing me records for next 12 months.
How can I solve this Issue??
Thanks and Regards,
Amit Koul

Dinesh,
The filter that you suggested works for last 365days, if you try to create a simple report with just Date field in it, you will come to know the difference.
Using the filter suggested by you it will show me records from 27th Jan 2008 since today the date is 27th Jan 2009.
I want it to filter records for last 12 months including Jan 2009.(so the interval comes to be Feb 2008 to Jan 2009)
Hope I made sense!!
Thanks and Regards,
Amit koul
Edited by: Amit Koul on Jan 27, 2009 7:27 PM

Similar Messages

  • Report to display (actuals data from one cube and plan from another)

    Hi Gurus,
             I have a requirement in reporting to display actual data from one cube and plan data from a different one.
            The example below might give a clear picture of the requirement.
    rows has key figures and columns = months
    Jan |  Feb |  Mar |  Apr |  May |  Jun  ...   ....
    GrossSales
    Net Sales   
    Now if I run the report for Current month (Apr), then for the months of (Jan, Feb and Mar) i need to get the data from CUBE1   and for the remaining months (Apr thru Dec) from CUBE2.
    Similarly when i run the report next month(may), 
    then (data for Jan, Feb, Mar, Apr  from CUBE1)
    and ( May thru Dec from CUBE2)
    Any suggestions.
    Thanks in Advance
    Kumar

    Hi Henry,
         We alreadey have a multi provider which includes
    FinDat Cube(CUBE1) for actuals and Comm.Goals cube (CUBE2) for plan.
    So you suggest that we have two versions of key figure for actual and plan.
    ie. each KF will have two versions.
    actuals = (version 10, FiscPer<curr.mnth, key figure, acutals cube)
    Plan = (version 20, FiscPer>=curr.mnth, key figure, comm.goals cube)
    eg:
    Jan | Feb | Mar | Apr | May | Jun ...
    GrossSales(Act)
    GrossSlaes(Plan)
    Net Sales(Acutal)
    Net Sales(Plan)
    Correct me if I am wrong.
    the report has a lot of key figures, having two versions for each kf will be confusing.
    the user would like to see
    Jan.....| ...Feb  |..Mar |..Apr.....|  May  | 
    GrossSales   Act Value|Act.V |Act.V| PlanVal|PlanVal|
    Net Sales
    where Act.Value is from CUBE1
             Plan Value is from CUBE2
    Thanks
    Kumar

  • When I send mi presentation to a Quick Movie, the program record only the last frame

    Why when I send mi presentation to a Quick Movie, the program record only the last frame, how I do to record the whole presentation of 52 frames

    I mean when I try to burn a CD.

  • Select only the last 12 months

    Hi all
    I need to write a query that will select only records from the last 12 months, order them by customer ID, and show one column per month, and a Total column where I need to add monthly Values.
    The table has the following fields
    •     YearMonth varchar(6)
    •     CustomerID varchar(15)
    •     Value integer
    Records example
    - 200809, 1, 10
    - 200809,2,20
    - 200808,1,15
    - 200808,2,12
    - 200501, ….
    I need to write a query and place it in a view that will select only records from the last 12 months, order them by customer ID, and show one column per month, and a Total column where I need to add monthly Values.
    The results should display the:
    •     CustomerID,
    •     one column per month displaying the Value
    • and the total column (sum monthly values for a customer)
    My questions are:
    •     How do I select records only from the last 12 months
    •     How do I name dynamically the columns, because today October,15 the list will start in November 2007 through October 2008, but next month it will move from December 2007 through October 2008
    •     How do I create a view with dynamic columns
    •     How do I create a column totals
    Please advice

    Hi,
    user631364 wrote:
    ... My questions are:
    •     How do I select records only from the last 12 monthsThere a a couple of things you could mean by "the last 12 months".
    Hkandpal showed you one way.
    Another is
    WHERE   yearmonth >= TO_CHAR (ADD_MONTHS (SYSDATE, -11), 'YYYYMM')
      AND   yearmonth <= TO_CHAR (            SYSDATE,       'YYYYMM')Storing DATEs in a VARCHAR2 column (or in any type of column other than DATE) is a bad idea. At best, it will involve lots of conversions, like those above.
    •     How do I name dynamically the columns, because today October,15 the list will start in November 2007 through October 2008, but next month it will move from December 2007 through October 2008
    •     How do I create a view with dynamic columns
    How to Pivot a Table with a Dynamic Number of Columns
    For example, you want to make a cross-tab output of
    the scott.emp table.
    Each row will represent a department.
    There will be a separate column for each job.
    Each cell will contain the number of employees in
         a specific department having a specific job.
    The exact same solution must work with any number
    of departments and columns.
    (Within reason: there's no guarantee this will work if you
    want 2000 columns.)
    PROMPT     ==========  0. Basic Pivot  ==========
    SELECT     deptno
    ,     COUNT (CASE WHEN job = 'ANALYST' THEN 1 END)     AS analyst_cnt
    ,     COUNT (CASE WHEN job = 'CLERK'   THEN 1 END)     AS clerk_cnt
    ,     COUNT (CASE WHEN job = 'MANAGER' THEN 1 END)     AS manager_cnt
    FROM     scott.emp
    WHERE     job     IN ('ANALYST', 'CLERK', 'MANAGER')
    GROUP BY     deptno
    ORDER BY     deptno
    PROMPT     ==========  1. Dynamic Pivot  ==========
    --     *****  Start of dynamic_pivot.sql  *****
    -- Suppress SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    SPOOL     p:\sql\cookbook\dynamic_pivot_subscript.sql
    SELECT     DISTINCT
         ',     COUNT (CASE WHEN job = '''
    ||     job
    ||     ''' '     AS txt1
    ,     'THEN 1 END)     AS '
    ||     job
    ||     '_CNT'     AS txt2
    FROM     scott.emp
    ORDER BY     txt1;
    SPOOL     OFF
    -- Restore SQL*Plus features suppressed earlier
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    SPOOL     p:\sql\cookbook\dynamic_pivot.lst
    SELECT     deptno
    @@dynamic_pivot_subscript
    FROM     scott.emp
    GROUP BY     deptno
    ORDER BY     deptno
    SPOOL     OFF
    --     *****  End of dynamic_pivot.sql  *****
    EXPLANATION:
    The basic pivot assumes you know the number of distinct jobs,
    and the name of each one.  If you do, then writing a pivot query
    is simply a matter of writing the correct number of ", COUNT ... AS ..."\
    lines, with the name entered in two places on each one.  That is easily
    done by a preliminary query, which uses SPOOL to write a sub-script
    (called dynamic_pivot_subscript.sql in this example).
    The main script invokes this sub-script at the proper point.
    In practice, .SQL scripts usually contain one or more complete
    statements, but there's nothing that says they have to.
    This one contains just a fragment from the middle of a SELECT statement.
    Before creating the sub-script, remember to turn off SQL*Plus features
    that are designed to help humans read the output (such as headings and
    feedback messages like "7 rows selected.", since we do not want these
    to appear in the sub-script.
    Remember to turn these features on again before running the main query.
    •     How do I create a column totalsIn SQL*Plus, use the BREAK command.
    In SQL, "GROUP BY ROLLUP" or "GROUP BY GROUPING SETS"

  • MM-Report to see the materials which is not used from last 3 months

    Dear All,
    I want to find out the materials which are not used from last 3 months.Is there any report?
    Thanks
    Vishal

    Hi
    check MB5B
    give material and plant there
    select valuates stock radio button and NON-Hierarchical representation layout  on selection screen
    give last three month duration period on selection screen and execute report
    and see total  Goods receipt and total goods issue for material
    Regards
    kailas ugale

  • Need to display records only once for that particular group

    Hi,
    I have a requirement like displaying repeated records only once for that particular group.
    For eg, in the emp table, I need to display repeated deptno only once for the particular group of job.
    And for the above requirement I have used the below query,
    SELECT empno, DECODE (LAG (job, 1) OVER (ORDER BY job), job, NULL, job),
    DECODE (LAG (deptno, 1) OVER (ORDER BY deptno), deptno, NULL, deptno)
    FROM emp;
    Output:
    EMPNO     JOB     DEPTNO
    7782          10
    7934     CLERK     
    7839     PRESIDENT     
    7876          20
    7788          
    7902     ANALYST     
    7566     MANAGER     
    7844          30
    7900          
    7654     SALESMAN     
    7698          
    But in the above output you can find that, say deptno 10 is getting displayed only once, whereas I want that deptno 10 to be checked whether it is getting repeated within the group of JOB and than hide the deptno 10 only if it is repeated within that job group. If not, deptno 10 should be displayed again.
    Please help me in this.
    Regards,
    Shiva

    Hi,
    Hope the below helps.
    SELECT emp_id, job, deptno,
           CASE WHEN LAG(deptno, 1) OVER (partition by job order by deptno) = deptno THEN null else deptno end
      FROM empRegards
    Ameya

  • T400 (2765/21G) Audio-Recording only from Microphone ?

    Hello Forum,
    in my T400 works an Conexant Smart 221 Chip for Sound.
    Vista x64 Ultimate is my System.
    Now I try to record Sound from an avi File (During the File play).
    The Problem is: In the Recording Settings, Microphone is the only Choice for Record Source.
    I missed an entry like "Stereo-Mix" or "What you hear" (the Devicename is Different).
    In every PC or Notebook System I ever had, I was able to record the Sound that actually plays on the System.
    So what...? Do I need other Driver ? Doesn´t the Conexant Smart 221 support that ?
    Anyone an Idea ?
    I hope the Post is readable for you, and my English is realy not perfect 
    Good new Year from Germany
    Userle 

    Hello Userle,
    unfortunately, the stereomix feature is disabled, by hardware, since T/ 61 series.
    It seem there is no workaround to get to work. Please have a look at this extenisive thread
    on thinkpads.com.
    Follow @LenovoForums on Twitter! Try the forum search, before first posting: Forum Search Option
    Please insert your type, model (not S/N) number and used OS in your posts.
    I´m a volunteer here using New X1 Carbon, ThinkPad Yoga, Yoga 11s, Yoga 13, T430s,T510, X220t, IdeaCentre B540.
    TIP: If your computer runs satisfactorily now, it may not be necessary to update the system.
     English Community       Deutsche Community       Comunidad en Español

  • To display records fetched from the DB through ALBPM, in a custom JSP

    I want to display the records fetched from the database through ALBPM in a custom JSP as a table.
    Currently I am fetching the records and putting them in a BPM object group and sending it to the JSP as a BPM object. Now in the JSP I am trying to iterate and create a table to display the fetched data using the JSTL tag ==&gt;
    &lt;c:forEach ...... &gt;
    &lt;/c:forEach&gt;
    But I am always getting the following error in ALBPM workspace:
    The task could not be successfully executed. Reason: 'java.lang.RuntimeException: /webRoot/customJSP/CustomerSearch1.jsp(29,2) No such tag forEach var in the tag library imported with prefix c'
    Though there is a tag forEach var in the JSTL?? How to solve this error or is there any altrnative way to display the records in a JSP ??
    Thanks,
    Suman.

    Hello. I use custom JSP and it works well. You have to make sure 2 things:
    a) You have imported the libs, including these lines in your JSP:
    <%@ page session="true" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://fuego.com/jsp/ftl" prefix="f" %>
    b) The variable you are using in the "forEach" statement is stored in the BPM object you pass to the JSP in the call.
    Hope this helps.... Bye

  • Fetch records in the last 12 months

    Hi All,
    I have an activity metrix field which returns the total number of completed activities for an account. My requirement is , I need only the total number of activities completed in the last 12 months from today.
    So if a user views the same report after 3 months then it should display the list of completed activities in the last 12 months from that day.
    Please suggest how to go about adding this filter.
    Column Name - "Activity Metrics"."# of Closed Activities"
    So I need COUNT("Activity Metrics"."# of Closed Activities") in the last 12 months...Please suggest how to get this expression.
    Thanks
    Natraj

    Hi,
    If your intention is to find out number of closed opportunities among activities created in last 12 months, a filter on created data like below can help
    Activity."Created Date" >= TimestampAdd(SQL_TSI_MONTH,-12,Current_Date)
    You have to use under Filter -> Convert this filter into SQL option
    -- Venky CRMIT

  • I have lost pictures in my albums. Only some.  I deleted same photos from last 18 months because they were duplicates.  Did this make the pictures disappear from yhe albums?

    I have lost the pictures in most of my albums.  After I creatd the albums, I went back to the same pictures in the last 18 months and erased them.  Did this cause the album pictures to also be erased?  My Itunes was acting like my Ipad was attached, but it  was not.  Help

    Was that in iPhoto on your Mac or on your iPad?
    , I went back to the same pictures in the last 18 months and erased them.
    Then, sorry to say, you will have deleted the photos  from your iPhoto library.
    Have you checked iPhoto's Trash and the Trash on your Desktop, if the photos are still there? Then put them back from iPhoto's Trash or move them back from the trash basket on your Desktop.
    Did this cause the album pictures to also be erased?
    Albums do not store photos or duplicate photos - they are a way to group photos that are stored in events,  just an index, showing you a subset of the photos in the library. A photo can be used in many albums, without needing more storage. When you delete a photo from its event, it will be removed from all albums, and all other views of the iPhoto library. Never delete a phot from its event, unless you want to remove it completely from your iPhoto library. A photo is only a duplicate, unless you have imported the same file twice and you see the copy in an event.
    iPhoto has several views, that may show you the same photos in different groupings, for easy access, but do not contain duplicates.
    If you cannot retrieve your photos from the Trashs, restore your iPhoto Library from the last backup, that contains all photos.  If there is no recent backup, you may want to try recovery software - then stop using your mac and don't do anything that writes to your harddisk, until you recovered, what is still on your disk.
    For example,
    Disk Drill: http://www.cleverfiles.com/
    usually makes a very good job of finding any jpegs, that still can be found on the harddrive.
    My Itunes was acting like my Ipad was attached, but it  was not.
    I don't understand, why you mention the iPad? Have you synced your photos to your iPad and are there still copies of them in your albums on the iPad?
    Regards
    Léonie

  • Report to display record

    I have report that have 1000 records and we have 3 types of user user1,user2,user3 I want when user1 run the report the only 100 record idisplayed rest 900 is not dislayed. when user2 run the report then on 200 record displayed rest and 800 record is not displayed.when 1000 user3 is run the report then all 1000 record is displayed how do i acheive this issue
    thanks

    Hi,
    Eg: you have data in ODS/Cube like..
    Material-Date-Qty
    M1-10-02-2009-100
    M2-10-02-2009-300
    M1-11-02-2009-400
    M2-11-02-2009-200
    M1-12-02-2009-100
    M2-12-02-2009-300
    M1-12-02-2009-400
    M2-12-02-2009-200
    So in report you want to display only 12-02-2009 data, so define a customer exit variable on Date (0calday/any other date whichh you want to) and calculate the recent datae from sy-datum. And take only one date or date range using SY-DATUM.
    Eg: Today is 13-02-2009, so you want to display 11 and 12 data, then calculate SY-DATUM-1 and SY-DATUM-2 and restrict the Customer exit variable in report.
    Thanks
    Reddy

  • Report to display a picture from a blob column

    hi all
    i have a problem :please help
    environment: oracle AS 10.1.2.0.2 portal version 10.1.4
    i have a slq report:
    select field1,field2...,,
    decode(cd.photo, empty_blob(),
    '<img src="MYCS.show_img?p_field=IMG&p_rowid=NO_CHILD_PIC">',
    decode(cd.SOURCE, 'MAIN',
    '<img src="MYCS.show_img?p_field=CHILD&p_rowid='||mycs_lib.url_encode(cd.rid)||'" width=160 height=120>',
    '<img src="MYCS.show_img?p_field=CHILDARCH&p_rowid='||mycs_lib.url_encode(cd.rid)||'" width=160 height=120>')
    ) "PHOTO"
    from MYCS.mycs_child_details_v cd
    where cd.id like :child_id
    adn ...
    The last field on the (select statement) is a photo(blob type)
    NB:MYCS.mycs_child_details_v is a view
    trying to create the report i get the following Error:
    unable to describe SQL statement. Please correct it (WWV-13010)
    Took exception (WWV-13005)
    ORA-00942: inconsistent datatypes: expected - BLOB wwv-11230
    This report runs without any errors on portal 3.0.9 9i AS
    i dont understand what could be wrong here?
    is BLOB datatype not supported by/on portal?
    is the other way i can display this picture(s)?

    Jean,
    See this thread:
    How can I upload/display image within a record ?
    Sergio

  • How to set the filter on a report to show the data for the Current Month

    Hi all,
    I am working on a report, which currently has this filter: Date First Worked is greater than or equal to 10/01/2010. This reports show the data for the current month, so at the beginning of each month we have to remember to change the date on the filter.
    Does anyone know what the criteria should say, so that it automatically changes and shows the information for the current month, without us having to go in and change anything?
    Any help would be greatly appreciated!
    Thanks,
    AA

    You need to add a session variable to date fir worked assuming that this is a date field.
    To do this open up the filter on the field then at then press add Variable then "session" and enter the following CURRENT_MONTH into the Server Variable section.

  • Dynamic LOV, how to display substring only from a column

    Hi all,
    I have a column PRODUCT_CODE in table WORKORDER, has data like
    SUL-3304DT.....
    SUK-GERE.....
    STJ13-89t-78kg-....
    SUL-666...
    SUK-56K....
    I want to create a LOV to list only the (distinct) substrings before the first hyphen "-", both display and return values like
    SUL
    SUK
    STJ
    I can run the following query in sql developer:
    select p, p
    from
    (select distinct substr(product_code,1,instr(product_code,'-',2,1)-1) as p from workorder);
    but I don't know if it is possible and how to get the LOV. APEX returns error saying something about in-line query.
    anybody can help or any suggestion on this?
    Your help will be appreciated.
    Thanks,
    HSP

    Hi
    Try this
    SELECT DISTINCT ( SUBSTR( product_code, 1, INSTR( product_code, '-', 2, 1 ) - 1 ) ) d
                    , SUBSTR( product_code, 1, INSTR( product_code, '-', 2, 1 ) - 1 )   r
    FROM workorderCheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Support Message from satelite system: Reported By field blank only from BI

    Hi,
    I have configured the Incident Management for solman 7.1 with SP12. I am using the transaction type ZMIN that is a copy of SMIN.
    In our landscape are two satelite systems: BI and ECC
    When I create a message from managed/satellite system via HELP>Create Support Message, it comes to Solman the field "Reported By" is not filled automatically if I created the message from BI. The Creation from ECC works fine: the field "Reported By" is filled automatically.
    The system data is fetched up correctly and it includes the system info, component code and all details. Even the Support Team Determination with BRF+ is working fine.
    Not successful actions to solve the problem:
    - I tried some access sequences in Partner Determination for "Reported By":
         - Preceeding Document -> Reporter -> Current User
         - User
    - Checked IB52
    - Checked DNO_CUST04
         No_User_CHECK; No Existence Check for User; field value:X
    - Checked BP (Generated with BP_GEN):
         identification in BP seems correct (I added created/expiry date manually)
    - Checked BCOS_CUST.
    - Checked Read RFC.
    Has someone an idea what the problem could be?
    Thank You for your effort in advance,
    Beda

    Hi,
    1) Under identification tab in external BP no. put details as
    <Server short name>space<client>space<search term
    (which you have maintained in address tab or employee no.
    of that user in satellite system)>
    2) In ID type put CRM001
    3) Under identification put details as <Server short
    name>space<installation no.>space<client>space<search
    term (which you have maintained in address tab or
    employee no. of that user in satellite system)>
    4)Go to trns. BP>select BP role as "Employee"> Indentification tab--> Maintain user name same as user id of employee in satellite system or serch term you maintained while creating BP.
    Try this. Reward the points for useful answer.
    Regards,
    Niks

Maybe you are looking for

  • How can I stop iTunes from changing my tags?

    I have a MacBook Pro running Yosemite, and iTunes 12. When I play a track, iTunes often changes the tags automatically, but not for every track. It's particularly difficult with compilations, where it will take a song and change the album to somethin

  • Save For Web is not working

    I just had my software updated from CS to CS5 (I'm in a new job and asked for this upgrade) and now when I go to Save For Web I get the following: Error The operation could not be completed The system cannot find the path specified Notes: - This wasn

  • Can't run fmx without the pll

    HI All, I have a form that has a pll attached to it, the problem is that i've to put the pll with the form, if i put the plx only the form doesn't open. How can i solve this problem as i can't put the pll at the customer side. I'm using oracle forms

  • Wanting to buy Iphone

    To Whom It May Concern, I want to buy a phone/pda that is for my business activities...is Iphone's To Do List and Calender function really good? easy to use? can anyone share your experience with me...so I can really make sure I can buy Iphone

  • Automating export versions after sorting a photoshoot - advice please!!!

    Hi I'm about to embark on a location shoot and I'm looking for workflow / automation advice which will help me to reduce my post production hours. I'm using a Nikon dSLR, Aperture and a MacBook Pro 15inch. My knoweldge of Aperture is fairly basic alt