Filtering 13 months of data by top 5 for current month

Hello,
I am wanting to create a table/chart to display the last 13 months worth of data filtered by the top 5 product categories for the current month.
I have to be able to have this dynamically gerenate, as I am unable to modify the filters each time the report is run.
I was doing this by having a little table to display the top 5 for the current month, and then filtering the 13 months of data based on that table, but this isn't working when I am unable to modify the report.
Is there any sort of formula that I can use to achieve this?
Thanks!
Stephanie

Hi Stephanie,
                       For displaying the data only for the last 13 months, you can try using the DaysBetween() function. Now, 13 months would approximately be 390 days. So assuming that you have at least one object in your report that displays the date (say for e.g. "MyDate"), you can use the following formula: If DaysBetween(CurrentDate(),MyDate) < 390 Then 1 Else 0. Give a name to this formula, and then drag it onto the report filter pane. In the condition, set it as 'Equal to 1'. This will filter the data for the past 13 months, and then you can apply the ranking for the Top 5 as per your requirement.
Regards,
Alok.

Similar Messages

  • Can i add data for current month only

    can I add data for current month only?

        Knowing your plan options is important marlingut! So that we are able to provide correct information, what make and model phone are you trying to add data too? Is this device already activated on your account?
    Thank You,
    MichelleL_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • Sales report for current month and year a go month

    i could you please guide me builting report for current monthwise for current month and year a ago month
    report parameter month_year='06-2010'
    tables = sales and below are the table fields
    customer_id
    invoice_dt
    invoice_am
    thanks
    nhm

    Okay, Still you did not mention how you will pass value in report while generating.
    Anyway the query with UNION ALL will work. For Example.
    I am assuming that the parameter for date/month you will pass in range like 01-JUN-2010 to 30-JUN-2010
    SELECT customer_id, SUM(curr_value) curr_value, SUM(past_value) past_value
    FROM
    SELECT customer_id, NVL(SUM(invoice_amount),0) curr_value, 0 past_value
    FROM sales
    WHERE invoice_dt BETWEEN :P_FROM_DATE AND :P_TO_DATE  -- here P_FROM_DATE and P_TO_DATE will be the date range for current year as i showed above.
    AND  -- Any Condition goes here...
    GROUP BY customer_id
    UNION ALL
    SELECT customer_id, 0, NVL(SUM(invoice_amount),0)
    FROM sales
    WHERE invoice_dt BETWEEN ADD_MONTHS(:P_FROM_DATE,-12) AND ADD_MONTHS(:P_TO_DATE,-12) -- This add_months function for the previous year same month.
    AND -- Any condition goes here...
    GROUP BY customer_id
    GROUP BY customer_idNow using the above query you can design the tabular report as you showed the format.
    -Ammad
    Edited by: Ammad Ahmed on Jul 3, 2010 7:55 PM
    added GROUP BY

  • Parameter for Current Month and Previous Month

    I'm trying to create a parameter for current month and previous month based on the ex_date, but not sure what i'm doing wrong. 
    where ex_date = @SelectDate
    I created a second dataset below for the values in the parameters.
    SELECT Month(CURRENT_TIMESTAMP) AS 'Month', 'Current Month' as 'Current Month'
    union all
    SELECT Month(CURRENT_TIMESTAMP)-1 AS Month, 'Previous Month' as 'Previous Month'
    Results
    Month Current Month
    3 Current Month
    2 Previous Month
    Once I preview it I get "Conversion failed when converting date and/ or time from character string" I changed the data type to "date/Time" but that did not make a difference. The date is convert (varchar(10), ex_date, 101) so looks like
    11/12/2014. 
    I've also tried expressions like =month(now()) to pull current month with same error so i'm not sure what i'm doing wrong. Any ideas?

    i tired this real simple report
     in the first dataset - my main report query - select name from sysdatabases where month(crdate())=@month
    in the second dataset - select month(getdate()) as Month1
    in the parameters - choose int data type and available values - select the second data set
    in the first data set- add this parameter..( i am assumming you know this, since you have done)
    in the preview you should get the drop down with current month number - 3
    and if you run the report, it will display the database names that were created in march. remember we are no checking year, so will get all that were created in march across the years.
    Hope it Helps!!
    I'm looking to have the dropdown say "Previous Month" and "Current Month" as a option. I know how to get the information in SQL, but not sure how this translates or put into a parameter.
    Current Month
    list_date BETWEEN
    DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
    AND
    DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) + 1, 0)
    Previous Month
    list_date between
    CONVERT(varchar,dateadd(d,-(day(dateadd(m,-1,getdate()-2))),dateadd(m,-1,getdate()-1)),106) /* Last Month */
    and
    CONVERT(varchar,dateadd(d,-(day(getdate())),getdate()),106)

  • Report for getting an oppotunity for current month

    Please tell what can be a filter or function for getting an oppotunity for current month , i have the field as "Opportunity created date" so what function or SQL expression can b eused to get created date = current month's date

    Thanks..i'll do taht
    Edited by: user1074008 on Sep 28, 2010 3:11 AM

  • Showing Calendar for Current Month

    Dear Forum,
    I intend to display calendar in corner region of my home page for current month, and also want to highlight dates in calendar based on certain parameter or query output.
    How should i accomplish this in HTMLDB?
    Regards,
    Manpreet Johal

    Sir,
    Please answer to this problem asap.
    Regards,
    Manpreet Johal

  • Calendar - when I want to edit a monthly recurring event but only for one month I am no longer given the box to update only that date.

    Calenndar - when I want to edit a monthly recurring event but only for one month I am no longer given the box to update only that date month.  How do I do this with the new operating system?

    Adding to Alan's answer:
    One of the problems that comes with these tricks for variable-rate acquisition is being able to match up sample data with the time that it was sampled. 
    If you weren't using either of E-series board's counters, there is a nifty solution to this!  You'll be using 1 of the counters to generate the variable-rate sampling clock.  You can then use the 2nd counter to perform a buffered period measurement on the output of the 1st counter.  This gives you a hw-timed measurement of every sampling interval.  You would need to keep track of a cumulative sum of these periods to generate a hw-accurate timestamp value for each sample.
    Note:  the very first buffered period measurement is the time from starting the 2nd counter until the first active edge from the 1st.  For your app, you should ignore it.
    -Kevin P.

  • SapExit for Current month

    Hi,
    We have a scenario where we run the query monthly, expectation is the query should automatically default to using the current month. So do we have any sap exit for current month.
    Regards,
    Ravi

    Hello Please refer the following code
    MTD / MTM(For current default Month)
    Variable: ZP_X_09 For enetered month (on 0CALMONTH)
    For current Month by default or for any given Month (For full month)
    e.g. If current month/given month is 15.08.2009. It will give Aug-09.(200908)
      WHEN 'ZP_X_09'.
        IF i_step = 1.
          w_fm_month = sy-datum.
          CLEAR l_s_range.
          l_s_range-low    = w_fm_month.
          l_s_range-sign   = 'I'.
          l_s_range-opt    = 'EQ'.
          APPEND l_s_range TO e_t_range.
          CLEAR : w_fm_month.
        ENDIF.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range
            WHERE vnam = 'ZP_X_09'.
            CLEAR l_s_range.
            l_s_range-low    = loc_var_range-low.
            l_s_range-sign   = 'I'.
            l_s_range-opt    = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
          CLEAR : w_fm_month.
        ENDIF.
    Regards,
    Krunalkumar Rathod

  • Get data for current month in VC from query - Urgent

    Hi all,
    I have designed a query for cube FIAR_C03 for overdue items and query output contains customer, net due date, document date, fiscal year period and amount. I want a chart for that query in VC that only contains those items in which net due date is in current month. How can i do that?
    Where I can place the condition to display only those items in vc in which net due date is in current month and how ?
    Please respond.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi Aisha,
    It is possible to do with following steps:
    1. In Query Design make your field 'Net Due' filter with variable for date input (0CALMONTH for example where your date should be this format MMYYYY). Test your query and see if you input a month/year date it would would work;
    2. Build one table from output of your query (choose fields);
    3. In Visual Composer, drag your query into your board and from 'Varaiables' port  (NOT FROM INPUT) drag a line to create a Start point. As soon you realease to create 'Start' a box will ask which fields you want. Choose your date as field;
    4. Select the line between Start point a query. In Input Field assigned the following formula (DSTR(NOW(),'MMYYYY') *
    5. Deploy your model
    at this formula I said: transform NOW(), current date, in Text with format MMYYYY (012002 for example).
    It works!
    Assigned points if was helpful.
    Kind Regards,
    Gilson Teixeira

  • Load data only for current month using ABAP Routine

    Hi Everyone,
    I am loading data from R/3 using the 0HR_PA_OS_1 extractor. This requirement is to load the position numbers from R/3. Using the extractor for a given position 28 I get the following dataset results.
    CALMONTH  POSITION
    11-2004           28
    12-2004           28
    01-2005           28
    02-2005           28
          |
    07-2007          28     CURRENT DATE
    Now when I pull data in BW I only want to load the record for most current i.e. 07-2007. I DO NOT want that ALL the records since the day the position was created should be loaded.
    Now I do understand this can be achieved using a ABAP routine in the INFOPACKAGE. Below is the routine that I am using and what it is doing is that it is only bringing in the first record.
    data: l_idx like sy-tabix.
      clear: l_idx.
      read table l_t_range with key
           fieldname = 'CALMONTH'.
      l_idx = sy-tabix.
    Current month only
      l_t_range-low = sy-datum(6).      "Current month
    l_t_range-high.
      l_t_range-option = 'EQ'.                           "equals
    l_t_range-sign = 'I'.
      modify l_t_range index l_idx.
      p_subrc = 0.
    Can anyone suggest a solution as to why this is happening?
    Thanks,
    Rahul

    One explanation would be
    - If there is no CALMONTH selection values specified in the selection tab, l_t_range would be empty. This would mean there would be no line for CALMONTH selection, and the code won't modify the l_t_range.
    If this is true, you need to check sy-subrc after reading from the itab.
    data: l_idx like sy-tabix.
    clear: l_idx.
    read table l_t_range with key fieldname = 'CALMONTH'.
    if sy-subrc = 0.
    l_idx = sy-tabix.
    * Current month only
    l_t_range-low = sy-datum(6). "Current month
    * l_t_range-high.
    l_t_range-option = 'EQ'. "equals
    * l_t_range-sign = 'I'.
    modify l_t_range index l_idx.
    else.   
    move 'CALMONTH' to l_t_range-fieldname.
    l_t_range-low = sy-datum(6).
    l_t_range-sign = 'I'.
    l_t_range-option = 'EQ'.
    append l_t_range.
    endif.
    p_subrc = 0.

  • Delete DSO data for current month on a daily basis.

    Hi Gurus,
    We have a requirement where we have to delete the data in the BW DSO's for the Current Month every day before loading data into it. The reason for this is that in R3 they delete data for the current month in addition to adding new records and changing existing records. Since we do a Full load in BW, the deleted records in R3 will still exist in the BW DSO, hence the need for deletion.
    We can't delete ALL the data in the DSO as we use the BW DSO for Archiving purpose and the R3 table at any point of time will have just 3 months of data, while BW will have historical data.
    I know there is a process to delete DSO contents in the Process Chain, but can it be set up to just delete the current months data??
    Thanks
    Arvind

    Hi Arvind,
    The program RSDRD_DELETE_FACTS or transaction DELETE_FACTS will help you in deleting the records. Execute the program and select the option 'Generate Selection Program'. It will create a Z program , you can then dynamically select the current month in the Variant and assign the Z program and the variant in ABAP step of the process chain.
    Hope this helps with your requirement.
    Regards,
    BINETWEAVER2004s

  • UIX 2.1.21: Date OnBlurValidator automatically add current month or year?

    Would be nice if the OnBlurValidator for a UIX Date field could automatically add a missing month or year.
    e.g. Format dd.mm.yyyy
    When the user enters 01.01. the current year could be added automatically.
    Or when the users only enters 01. the current month and year could be added.
    Would be a nice feature additionally to the already existing lenient-date-formats = true.
    Really great would be to allow entering values like "now" / ".", "yesterday" / "-" or "tomorrow" / "+" that are evaluated to the according dates (of course internationalized).
    Thanks, Markus

    hey mill1640,
    Did you ever get your iPhone to register with iTunes? I just upgraded as well to Snow Leopard, and my my isn't recognized at all also.
    If you did get this resolved, I would appreciate a little suggestion in the right direction.
    Many thanks,
    Josh

  • Mobile Email not retrieving messages for current month

    I did a couple of quick searches on this problem, but I couldn't find any information if this is a known bug with the Mobile Email application.  For the last week or so, whenever I access Mobile Email on my LG enV Touch, the first page of emails shown are for the previous month, but the same day of the month (so today is August 16th, 2010, and the newest messages I can access are from July 16, 2010).  There is no software update available.  From the application's info page it seems like my version is 3.1.3.2.
    Also, the email address that is being accessed is for an @comcast.net account, but this setup has been working fine for over a year now, until this issue came up. When I access this account elsewhere, it does show messages for the current day, like normal.
    Has anybody seen a problem like this?  Any suggestions for next step on looking into this?
    Thank you.
    - Wes

    I do apologize that you are not able to retrieve any of the current months emails.from your device.However you may need to re download the mobile email application in order to get the emails to start coming through. Here are some steps to downloading the mobile email application from  your device. Hope this helps!
    From the main screen, select Menu.
    Select Media Center (Get It Now).
    Select Browse & Download (Tools on the Go).
    Select Get New Applications.
    Select Mobile Email.
    Select the purchase option.
    If prompted, select Yes to start the download.
    Select Yes.
    To continue the installation, review the Terms of Use, then select Accept.
    Select the desired email provider, then choose Select.
    If prompted, review the Terms of Use for the email provider, then select Accept.
    Enter the username and password, then select Sign In.
     Username and password are case sensitive

  • Query on DSO is taking more time for current month

    Hi All,
    I have query bulit on DSO is running fine for all the month, but only the problem with ccurrent month. For April is taking more than 15 min to run query though it got less records. For other month is taking less than one sec. Could you help me to resolve the issue.
    Regards,
    J B

    Hi JB,
      Same problem we are facing. Last month users ran till from 01.03.2011 to 15.03.2011 around 17.03.2011 even the data volume is less it is running slow or some times not coming. This month it is slow for 01.04.2011 to 11.04.2011 ...
    I am also weird, and this is happening after latest patch implementation.I am not exactly sure why it happens.
    The fix we have done is restricted in the backend on that date from 01.01.1900 -  31.12.9999 and now allowed filter again on the same date. Now if we use the same date range it is running fine.
    Also try if you inpit 01.01.2011 -  31.12.2011 and check the time whether it is running fast or not....it is running normal ...
    Regards
    vamsi

  • Delete cost run & reset release for current month

    For our client we have created a new plant while testing this plant user created a material and they have done a cost run in ck11n  with costing varient zv01 but in they released the cost with costing varient ppc1 with this system got inconsistency and not not allowing to release cost for any other material in the current month if we try to mark it for next month it is working fine.
    we deleted the cost run through ck44 & ckr1 then also we are faceing the same problem. Kindly give me the solution how can i reset the release and later i want to run the ck11n & ck24 for material in the current month  to do  the production cycle.  please consider this is as a urgent.
    Regards
    Chakravarthy

    Hi
    Whether you should do MR21 or not ??
    a. If the cost estimate you reversed belongs to Last month and you are going to post the GR in last month then you should do MR21
    b. if the cost estimate you reversed belongs to may and GR will also be posted in May - No need for Mr21... Because, even though you release cost on say, may 2nd, the cost always gets released from the Start of the Month
    br, Ajay M

Maybe you are looking for

  • UK MBP delivery times

    Hi all, I ordered a 1.67 (now 1.83) on 8 Feb, but this was probably held up a bit due to the business leasing going through. The upgraded processor bumped my delivery date back from 28/2 to 10/3. Is anyone in the UK finding shipping times to be earli

  • Project Management Certifications

    Hi All, After going through Training and certification shop website of SAP what I could understand is there are 4 certifications available related to Project Management whose codes are given below: 1. C_PM_71 2. C_TPLM22_60 3. C_TPLM22_64 4. C_TPLM50

  • Java class in Oracle 8i.

    Hi All, I have tried to create a java class in Oracle8i but it throws some errors like: NAMED "MyTime" ERROR at line 3: ORA-29516: Aurora assertion failure: Assertion failure at eox.c:187 Uncaught exception Root of all Java exceptions: The program is

  • Handling Outer Join for hard coded values in the Logical Table Source

    Has anyone tried to apply an outer join in the Logical Table Source Content Tab? I have to add this APPLSYS.FND_LOOKUP_VALUES.LANGUAGE (+)= 'US' but the outer join is not allowed. I get this message.... [nQSError: 27002] Near <(>: Syntax error [nQSEr

  • Code too large Problem

    Hi,    I am facing the problem of code too large in EP6 SP9 version and EP6 SP2 version. Is there a way to solve this problem. Is this problem solved in the latest version EP6 SP12. Please help me out in this regard. Thanks and Regards Padmaja.P