How to make a Moving total in Query Designer

Hi,
I make trend analysis over sales.
Besides the actual sales figures, I would like to show a Moving Annual Total (MAT).
I can make this based on a specific period (using an offset of 0 to -11, and so on), but now I want to see the trend over an interval (for instance 12 month).
I am not able to incorporate the interval values into the period variable.
Can anybody help me with this?
Regards,
Erik Henning

Tanks again.
I am able to make a time (Fiscal year period) variable of the type interval to set the limits to my query.
I also was able to make a time (Fiscal year period) variable to set my offset to 0 to -11.
The problem is combining those two.
When I combine them, I have to enter the limit values and a value for the offset variable.
When I do that, I get the offset value of the period I entered in all the periods within my limits and that is not what I want. I want this offset period variable to use all the periods of my interval.
Can you tell me how to proceed?
Erik

Similar Messages

  • How to make outer join in Sub Query?

    Hi!
    I'm facing one problem. Can anyone tell me - how to make outer join in sub query?
    I'm pasting one sample code -
    select e.empno, e.ename,e.job,e.sal,d.deptno,d.dname
    from d_emp e, d_dept d
    where e.deptno(+) = (
                          case
                            when d_dept.deptno = 10
                              then
                                  select deptno
                                  from d_dept
                                  where dname = 'SALES'
                          else
                            d_dept.deptno
                          end
    SQL>
    ERROR at line 15:
    ORA-01799: a column may not be outer-joined to a subqueryHow to resolve this issue?
    Regards.

    And any luck with this?
    SQL> with emp as
      2  (select 100 empno, 'Abcd' ename, 1000 sal, 10 deptno from dual
      3  union all
      4  select 101 empno, 'RRR' ename, 2000 sal, 20 deptno from dual
      5  union all
      6  select 102 empno, 'KKK' ename, 3000 sal, 30 deptno from dual
      7  union all
      8  select 103 empno, 'PPP' ename, 4000 sal, 10 deptno from dual
      9  )
    10  ,dept as
    11  (select 10 deptno, 'FINANCE' dname from dual
    12  union all
    13  select 20 deptno, 'SALES' dname from dual
    14  union all
    15  select 30 deptno, 'IT' dname from dual
    16  union all
    17  select 40 deptno, 'HR' dname from dual
    18  )
    19  select e.empno, e.ename, e.sal, d.deptno, d.dname
    20  from emp e,
    21       (select decode(a.deptno, 10, b.deptno, a.deptno) deptno, decode(a.deptno, 10, b.dname, a.dname) dname
    22      from dept a, (select deptno, dname
    23                    from dept
    24                      where dname = 'SALES'
    25                     ) b
    26       ) d
    27  where e.deptno(+) = d.deptno
    28  /
         EMPNO ENAM        SAL     DEPTNO DNAME
           101 RRR        2000         20 SALES
           101 RRR        2000         20 SALES
           102 KKK        3000         30 IT
                                       40 HR
    SQL> Cheers
    Sarma.

  • How to write a condition in BEX Query Designer

    Hi
    How can i write a condition in Query Designer
    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    But i char assigment of a condition i find 4 option
    How can i achieve this
    Thanks

    Hi Aurun,
    Thanks for the help,Really appreciated
    As this is my first enhancement using ABAP & CMOD
    What type of key (either Access or developer ) do i require to perform the following  enhancement......so that i can raise request with basis team
    I shall be great ful if u can asnwer below question
    First, you need to create a variable for expiry date with processing type as customer exit, and then give the necessary info.
    In details tab, unchk ready for input as we wont be taking the value from the prompt.
    Now go to CMOD transaction.
    Open the correcsponding project which has the exit code
    (How can i identify the project which has exit code)
    and go to ZXRSRU001 module inside taht.
    Go to the module where u write the exit.
    (How to locate the required module)
    Then, under i step 1, write the code:
    IF I_STEP = 1.
    CASE V_NAME  (What is 'V_NAME',Is it my variable technical name)
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

  • How to search in BI 7.1 query designer for the required key figures & chars

    Hi All,
         Can anyone plz tell me how to search in BI 7.1 query designer for the required key figures & characteristics. I have the query being built on a multiprovider which has many cubes.
    So, i have a huge list of key figures and characteristics. I am not able to search for the required one by the name or the technical name.
    How can we search and pick the required object from the enormous list of the Mutliprovider in the Bex Query Designer??
    Thanks
    Phani

    There is not a search feature available. You have to do an educated guess under what dimension your infoobject could be and select.

  • How to make a Vertical Total of a multilline item?

    Hello,
    I have a block that contains 12 numeric multiline items. I would like to make a vertical total for each item.
    I tried to make a reference item, it didn't work. i tried also to make it by doing a Sum of my item, it didn't work neither.
    Could someone give me any ideas how to figure it out?
    thanks

    You use Summarized items for this:
    -Create a non-database-block, name it e.g. BL_CONTROL, set the property "Single record" to "Yes".
    -Create a number-item in the block, set the property "Calculation Mode" to "Summary", "Summary function" to "sum", and "Summarized Block" and "Summarized item" to your block/item you want to sum up.
    -Set the property "Query all records" to "Yes" on your database-block.

  • How To make group wise total in Bex report

    Hi!!! Guru's
    i m doing reporting on SD module, so client wann see the summerised report
    on delivarys, senario is the one sale order having the multiple delivery, so the
    i have to show the total result for all deliverys agianst the purticular sales order
    in one row.i know we can do that at the excel level but hot to do it at the query
    design level.highly appreciate u r help on this.
    wil asign pts for sure,,,
    thanks in adv
    Mohan

    Hi!!! Trippel K
    thanks for reply...
    my Q's is how to make the group wise total means, i m going to genaret the
    report on delivery delays on cube 0SD_C04 (Delivery Service), in that the the date
    is comming from the 2LIS_12_VCITM delivery item data, the schedule line data
    from 2LIS_12_VCSCL, when i m getting according to date wise it showing all data from item level n schedule line, the senario is i have to use date from item level n
    all delivery from schedule line, so any inputs regarding this, plz let me, wil appecite
    u inputs
    thanks in adv
    Mohan

  • How to make custom PLD from a query

    How would I make a PLD from a query?

    HI Jonathan,
    Did you mean this?
    Choose query that you want to create PLD then select create report
    Regards,
    JP

  • How to get grand total in query designer

    Hi,
       Antbody know how to get the grand total after the  last row in query designer? I
    Thanks

    Hi,
    If we select the very first Characterstic in the rows section and set the Supress result rows as "never".
    That will show the overall result in the end of the report,
    In the query properties tab ,check for display properties of the result.That should be set to bottom.
    Hope this will work.
    Thanks
    Mukesh

  • How to make Multiple parameters to sql query string seperated by ,(comma) ..

    Hi,
    I would like to konw how I can make multiple parameters to sql query string seperated by ,(comma)  ..
    For example, this parameters can be printed like 'abc,dde,ggf,eeg' ,once I use  "join(Parameters!rpCode.Value,",")" with report builder , 
    By the way, when I test this multiple parameters by Query Designer of report builder there was no problem,.(using Define query parameters, I put abc,dde,ggf,eeg)
    however, when I run this report , it won't be executing ,  with (rsErrorExecutingCommand)
    Plz, help me....

    If its sql query then it should like this
    Select t.*
    from table t
    inner join dbo.ParseValues(@Parameters,',')f
    on f.val = t.ID
    ParseValues can be found him
    http://visakhm.blogspot.in/2010/02/parsing-delimited-string.html
    or easier way is
    Select t.*
    from table t
    where ',' + @Parameters + ',' LIKE '%,' + CAST(t.ID AS varchar(10)) + ',%'
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to make a copy of a query?

    We can't find contex menu item to make a copy of a query when right clicking a query and can't find any picture icon/button to make it.  If someone can tell us on how to do it?
    Thanks

    Hi Kevin,
    To make a copy of the query use the "save as" option in the query designer and assign the new technical name and description.
    If you want to copy the query between 2 data targets then use the transaction RSZC.
    Bye
    Dinesh

  • How to make camera sound totally silent?

    I have Nokia E5 smartphone. I want to make camera sound totally off. I've download a patch file but it shows me certificate error. Is there any way to make camera totally off?

    @ic3_fir3_
    You're on the right track.  Phone hacking isn't an acceptable topic in these official forums, but do some more web research or ask on unofficial Symbian site.  I suspect you can still make it work, but sadly the process is harder than it used to be.

  • How to make record dirty programmatically after query record from db

    Hallo,
    JDeveloper 10.1.3.2
    I try to make record dirty after I query records.
    In VORowImpl.java I overwrite the populate() method:
    protected void populate(ResultSet resultSet) {
    super.populate(resultSet);
    setStatus("J");
    If I query DB for the first time, everything is ok.
    For the second time I get the errror:
    500 Internal Server Error
    oracle.jbo.TooManyObjectsException: JBO-25013: Te veel objecten komen overeen met de primaire sleutel oracle.jbo.Key[1 ].     
    at oracle.jbo.server.EntityCache.add(EntityCache.java:555)
         at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:1762)
         at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:2151)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1073)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2946)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2839)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2252)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2127)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1501)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3650)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2818)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2674)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2634)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getRowAtRangeIndex(ViewRowSetIteratorImpl.java:722)
         at oracle.jbo.server.ViewRowSetImpl.getRowAtRangeIndex(ViewRowSetImpl.java:3672)
         at oracle.jbo.server.ViewObjectImpl.getRowAtRangeIndex(ViewObjectImpl.java:6288)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding$FacesModel._bringInToRange(FacesCtrlRangeBinding.java:541)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlRangeBinding$FacesModel.setRowIndex(FacesCtrlRangeBinding.java:504)
         at oracle.jheadstart.controller.jsf.bean.JhsCollectionModel.setRowIndex(JhsCollectionModel.java:361)
         at oracle.adf.view.faces.component.UIXCollection.setRowIndex(UIXCollection.java:379)
    Thanks,
    Anna
    Edited by: adekkers on 11-nov-2010 16:13

    I'll try to explain.
    I have a db-view.
    I have instead of triggers on this view.
    The user queries my view. A set of records appears on screen (for example 15).
    The user changes some attributes for 2 records.
    Other records stay in retrieved state. Or he does not change any record at all
    The user wants all 15 records to be committed in database. Even this records are not updated on screen.
    There is logics in instead of triggers, that makes real table-updates.
    I'm not a guru in jdeveloper.
    I thougt it is possible make records dirty after retrieving from database. In that case the jdeveloper can use normal commit-button without extra coding from my side.
    The problem: I can not put retrieved record in dirty status.
    If I use populate method in VO I get the error when I query my view for the second time.
    Dimitar, sorry.
    I did not understand your explanation.
    Can you please give some example.
    Thanks,
    Anna

  • How to create a variable in Bex Query Designer

    Hi guys,
    I am writing a query for a travel management report using the SAP Standard cube. I would like to restrict the query so it only shows me the last two months excluding the current month. I have checked BI content in RSA1, but I canu2019t find a relevant SAP standard variable that I can use.
    Can anyone please tell me if I can create my own? And if so, how I can do this.
    Many Thanks
    Forhad.

    lets say u want to display following picture:
    sept$-----august$
    City
    -chicago123$--
    44$
    so in Query designer go to Default values section.
    Bring in Calendar month
    right click calendar month
    and hit Restrict
    now select variable
    use standard sap variable Current Month.
    hit okey
    now select Variable and hit Red button
    Result u restricted current month.
    in columns bring in keyfigure $
    right click and hit edit
    bring in time field calendar month
    right click and hit restrict
    bring in Current month
    right click and select - SET OFFSET FOR VARIABLE
    select -1
    hit okey
    repeat the above process
    and this time select offset = -2
    this way u restricted current month
    but displayed last 2 months for keyfigure values.

  • How to get the standard Menu of Query Designer into Web Template

    Hi Experts,
    is there a way on how to put the standard menu within Bex Query Designer (after executing a Query with the Query Designer you get into ad-hoc reporting with a menu including several functions like print, show as..., properties, etc) into an individual Bex Web Template?
    Copy & Paste source code will not work I guess because of several javascript functions I don't have access to.
    Thanks & Best regards
    Tobias

    BEx queries are displayed on the web using standard web template 0ANALYSIS_PATTERN or some customized version base don your implementation.
    You can either include the 0ANALYSIS_Pattern web template in your custom template or use Save as to create a new template with 0ANALYSIS_Pattern  AS THE STARTING POINT.

  • How to copy restricted key figures in query designer ?

    hi,
    i have created a query in query designer (BI 7.0).
    How can i copy existing restricted key figures ? i can't find anything. i always have to create a new one, and then i have to do all the things like 'details of selection' etc.... manually. that CANNOT be, there MUST be a way to copy those key figures.
    any ideas ?
    best regards, Martin

    Hi Martin,
    Restricted key figures can be stored on the infoprovider basis . For which right click on the key figure (left hand side pane ), Select the necessary key figure and assign the restriction through characteristics combination, and give it a restriction and save it . Next tiem when you create query on the same info provider it should appear in the left hand side as readymade reusable piece .
    Hope that helps.
    Regards
    Mr Kapadia

Maybe you are looking for

  • Creating websites in photoshop and export to dreamweaver

    Ok. I NEED HELP!!! I tend to create complex designs in photoshop, and I can never get my images to line up correctly in Dreamweaver. I had sliced each image in photoshop, and saved them as HTML and Images, I open it up in dreamweaver, and none of my

  • System copy with NW 7.01 Ehp1 MaxDB hang

    Hi I'm performing a system copy with a NW 7.01 Ehp1 MaxDB from a Dev to QA. The source system copy was run successfully but in the target system copy, the sapinst keep running and running for days at IMPORT ABAP step (Phase 18 of 27). I don't know wh

  • How do I find locations outside of the country that I'm in?

    I'm in China and all of the search results within the Maps app are inside of china. For example, a search for "New York City, New York, USA" returns results for a pizza shops named "New York, New York" in China, but nothing in the United States. Simi

  • New HD not recognized as startup disk after Time Machine restore

    I installed a 320 GB seagate HD (original drive from my Mac Pro) into my wife's iMac G5 1.8Ghz replacing the stock 80 GB drive. Once I completed the installation, I used the "Restore from a Time Machine Backup" option on the OS X 10.5 installer disk

  • Email not fetching, not sending

    My yahoo email has worked fine since I got the Droid X last September.  The last email update I received as 6/21 at 5:19 pm.  I've received many emails since then but the Droid has not updated since then and the manual fetch isn't working.  I compose