Calculating rolling periods on weekly base

Hi All,
can anybody help me with the following problem:
I want to display weekly variance to previous year. But calculation should be done on cumulated values and not on single values.
For example, at the moment it is week 4/2008.
Query should display
Week 1: 2008 = 500€;  2007 = 250€;  Deviation = 50%
Week 2: 2008 = 1000€ (500€ for week 1 + 500€ for week 2); 2007= 250€ (250€ for week 1 + 0€ for week 2); Deviation= 75%
Week 3: 2008 = 2000€ (500 week 1 + 500 week 2 + 1000 week 3); 2007=500€(250€ week 1+ 0€ week 2 + 250 week 3); Deviation = 75%
When I create two key figures for absolute values and hide them and choose the cumulated button in key figure definition (properties of key figure), then the absolute values are displayed correctly. But variance between these two key figures is not calculated correctly, because the system internally doesn't calculate with cumulated values but with single values. That means in week 2, variance is not calculated between 1000€ and 500€ (deviation = 50%)but with 500€ and 0€ (deviation = 100%).    
Has anybody any solution for this problem on weekly base?
Thank you very much
Chris

Appears I was over-thinking this! I just did =Sum([Total Sales All] ForAll ([Period])) and that worked!

Similar Messages

  • My watches issue & rolling period logic

    Dear Concerned:
    I am unable to view my watches in control panel. I have been facing this problem since a long time , internet speed is awesome, other colleagues of mine can see their watches ,the page ends up in an error mentioned under
    Problem Report
    There was a communication problem.
    Message ID
    TCP_ERROR
    Problem Description     
    The system was unable to communicate with the server.
    Possible Problem Cause
        The Web server may be down.
        The Web server may be too busy.
        The Web server may be experiencing other problems, preventing it from responding to clients.
        The communication path may be experiencing problems.
    Possible Solution
    Try connecting to this server later.
    now in order to resolve the issue when i try to send an e mail to SAP network  using my official ID( i receive SDN correspondence on daily basis on my official ID  ) or other ID there is delivery failure and i am unable to send it to the concerned to get my issue resolved.
    Secondly i am unable to understand the rolling period logic with regard to daily decline in ranking.. I am top contributor on Financial Forum...Today my score is 662, by tomorrow it will be reduced by 20 or 30 , if the 30 days rolling logic would be applied then it should also stand true for other contributors. Rolling period logic was explained to me by Daily Decline in ranking score
    Their daily score does not decline. Why is that so? Would someone clarify the underlying logic.
    Regards

    Nilanjan,
    Thanks for your prompt reply as always.  Somehow I was able to get this thing working, please don't ask me how.  It was just a piece of bigger logic code. 
    I have awarded you full points..
    Thx,
    Rockdy

  • Dunning letters run automatically on a weekly basis

    Hi Expert,
    Is it possible to make the dunning letters run automatically on a weekly basis? If the answer is yes, then what config do we need to run the report on wekkly basis or what are the steps. Please let me know in very details, because, I am not the SD person.
    Thanks

    On your Router setup page set the MTU value from AUTO to Manual and change the Size from 1500 to 1350 and click on Save Settings...

  • Qualifications - Rolling period

    Hi Guys - I have a requirement to set up rolling period validity on Qualifications while I see that the standard if for Years / months. What is the best solution to implement rolling period (in days) of validity for a Qualification?

    Hi Matt,
    As far as I know OOQA transaction cannot be enhanced.
    One option that comes to my mind is, you can write in days to YEARS field and make your Z-reports accordingly. -take years field and show it as days-.
    Other than this, I don't think there is another option.
    Regards,
    Dilek

  • How to allow KPIs can keep data as weekly base, SSM7.5 ?

    How to allow KPIs can keep data as weekly base, SSM7.5 ?

    Chamnap,
    I would highly recommend taking some training before embarking on building models in PAS. Although the Help Guide in PAS will give you some of the information you need, I would really recommend training. While some modification of Cube Builder is possible, you do have to make those changes each time you rebuild your Cube Builder model.
    My suggestion would be to sign up for the OKP Training, which is an online training course for SSM 7.5. Being online, the course has recorded presentations and the 22 hours of material go through all aspects of SSM from the user and administration interfaces to an introduction and instruction on how to build models in PAS.
    This is the link to SAP Education and their listing of this offering:
    http://www.sap.com/services/education/catalog/globaltabbedcourse.epx?context=%5b%5bCPM_SM%7cOSM75%7c%7c%7c%7cG%7c%5d%5d%7c
    Regards,
    Bob

  • Alternative calculation type and alternative condition base value

    In pricing procedure what is the difference between alternative calculation type and alternative condition base value?Kindly help

    Hi,
    Please check the forum before you post your questions as this question was answered a number of times earlier.
    Please check the below link which discusses in detail regarding the same.
    [Alt Cal Type and Cond Base Value|Alternative calculation type and alterantive condition base value in pricin;
    Regards,
    Phani Prasad

  • Displaying ALV report  on Weekly Basis

    Hi all,
    I am working with an ALV report and i am giving my code below.I even got the output but i want to display the SALES ORDERS ON  WEEKLY BASIS.can any one provide me the code for this.its very urgent.
    REPORT  ZRRUU1 No standard page heading message-id zmsg line-size 255 line-count 65(3).
    TYPE-POOLS : slis .
    Structure Declarations
    TYPES : BEGIN OF tt_final,
               vbeln TYPE vbak-vbeln,
               vdatu TYPE vbak-vdatu,
               ernam TYPE vbak-ernam, "Created By
               auart TYPE vbak-auart, "Sales Order Type
               kunnr TYPE vbak-kunnr, "Customer number
               vkorg TYPE vbak-vkorg, "Sales Organization
               name1 TYPE kna1-name1,
               kwmeng TYPE vbap-kwmeng,
               arktx TYPE vbap-arktx,
               brown type vbap-kwmeng,
               gold type vbap-kwmeng,
            END OF tt_final.
    TYPES : BEGIN OF tt_vbep,
               wadat TYPE vbep-wadat, "Ship By
            END OF tt_vbep.
    TYPES : BEGIN OF tt_vbpa,
               vbeln TYPE vbpa-vbeln,
               kunnr TYPE vbpa-kunnr,
               name1 TYPE kna1-name1,
            END OF tt_vbpa.
    TYPES : BEGIN OF tt_vbap,
               vbeln TYPE vbap-vbeln,
               kwmeng TYPE vbap-kwmeng,
               arktx TYPE vbap-arktx,
               matnr TYPE vbap-matnr, "Material Number
            END OF tt_vbap.
    TYPES : BEGIN OF tt_vepvg,
              vbeln TYPE vepvg-vbeln,
            END OF tt_vepvg.
    TYPES : BEGIN OF tt_mvke,
              matnr TYPE mvke-matnr,
              mvgr1 type mvke-mvgr1,
            END OF tt_mvke.
    TYPES : BEGIN OF tt_brown,
              matnr type vbap-matnr,
              kwmeng1  TYPE vbap-kwmeng,
            END OF tt_brown.
    TYPES : BEGIN OF tt_gold,
              matnr type vbap-matnr,
              kwmeng2  TYPE vbap-kwmeng,
            END OF tt_gold.
    Internal Table Declarations
    DATA :  t_vbep TYPE TABLE OF tt_vbep,
            t_vbap TYPE TABLE OF tt_vbap,
            t_vepvg TYPE TABLE OF tt_vepvg,
            t_vbpa TYPE TABLE OF tt_vbpa,
            t_mvke TYPE TABLE OF tt_mvke,
            t_brown type table of tt_brown,
            t_gold type table of tt_gold,
            t_final TYPE TABLE OF tt_final.
    Work Area Declarations
    DATA :  wa_vbep TYPE tt_vbep,
            wa_vbap TYPE tt_vbap,
            wa_vepvg TYPE tt_vepvg,
            wa_vbpa TYPE tt_vbpa,
            wa_mvke TYPE tt_mvke,
            wa_brown type tt_brown,
            wa_gold type tt_gold,
            wa_final TYPE tt_final.
    data : i_vkorg type VKORG,
           i_ERNAM  type ernam,
           i_AUART type auart,
           i_WADAT type wadat,
            I_KUNNR TYPE KUNNR,
            i_matnr type matnr.
    Field Catalog Declarations
    DATA :  fcat TYPE slis_t_fieldcat_alv,
            wa_fcat TYPE slis_fieldcat_alv,
            layout  TYPE slis_layout_alv,
            sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
            events TYPE slis_t_event WITH HEADER LINE.
    Constants
    CONSTANTS : char1 TYPE i VALUE 1000,
                 c1(3) value 'CB4',
                c2(3)  value 'CB2'.
    Variable Declarations
    DATA :  repid LIKE sy-repid,
            l_text1 TYPE arktx,
            l_text2 TYPE kwmeng ,
            l_num1(10) TYPE N,
            l_num2(15) TYPE N,
            l_len       TYPE i.
    Select- options Declarations
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
          SELECT-OPTIONS : s_vkorg FOR wa_final-vkorg OBLIGATORY,
                           s_auart FOR wa_final-auart ,
                           s_wadat FOR wa_vbep-wadat.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
          SELECT-OPTIONS : s_ernam FOR wa_final-ernam,
                           s_kunnr FOR wa_final-kunnr,
                           s_matnr FOR wa_vbap-matnr.
    SELECTION-SCREEN END OF BLOCK b2.
    At Selection Screen Validations
    AT SELECTION-SCREEN ON s_vkorg .
    DATA : l_vkorg TYPE vbak-vkorg.
    SELECT SINGLE  vkorg  FROM vbak INTO  l_vkorg WHERE vkorg IN s_vkorg .
        IF sy-subrc NE 0.
            MESSAGE w000(zmsg).
        ENDIF.
    AT SELECTION-SCREEN ON S_AUART.
        SELECT SINGLE AUART
                  FROM VBAK
                  INTO i_AUART
                WHERE AUART IN S_AUART.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID SALES ORDER TYPE'.
          ENDIF.
    AT SELECTION-SCREEN ON S_WADAT.
    if S_WADAT is not initial.
        SELECT SINGLE WADAT
                FROM VBEP
                INTO i_WADAT
              WHERE WADAT IN S_WADAT.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID GOODS ISSUE DATE'.
          ENDIF.
    endif.
    AT SELECTION-SCREEN ON S_ERNAM.
    if s_ernam is not initial.
        SELECT SINGLE ERNAM
                FROM VBAK
                INTO i_ERNAM
              WHERE ERNAM IN S_ERNAM.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID CREATORS NAME'.
          ENDIF.
    endif.
    AT SELECTION-SCREEN ON S_KUNNR.
    if s_kunnr is not initial.
        SELECT SINGLE KUNNR
                FROM VBAK
                INTO I_KUNNR
              WHERE KUNNR IN S_KUNNR.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID SOLD-TO PARTY'.
          ENDIF.
    endif.
    AT SELECTION-SCREEN ON S_MATNR.
    if s_matnr is not initial.
        SELECT SINGLE MATNR
                FROM VBAP
                INTO I_MATNR
              WHERE MATNR IN S_MATNR.
          IF SY-SUBRC NE 0.
            MESSAGE I000 WITH 'ENTER VALID MATRL NO'.
          ENDIF.
    endif.
    START-OF-SELECTION.
      SELECT vbeln
             FROM vepvg
             INTO TABLE t_vepvg
             WHERE vstel = char1 AND vkorg IN s_vkorg.
        SELECT matnr mvgr1
               from mvke
               into table t_mvke
               where mvgr1 = c1  .
    IF t_vepvg IS NOT INITIAL.
        SELECT vbeln
               vdatu
               FROM vbak
               INTO CORRESPONDING FIELDS OF TABLE t_final
               FOR ALL ENTRIES IN t_vepvg
               WHERE vbeln = t_vepvg-vbeln
                         AND vkorg IN s_vkorg
                         AND auart IN s_auart .
    ENDIF.
    IF t_vepvg IS NOT INITIAL.
        SELECT a~vbeln
               a~kunnr
               b~name1
               INTO CORRESPONDING FIELDS OF  TABLE t_vbpa
               FROM vbpa AS a INNER JOIN kna1 AS b
               ON akunnr = bkunnr
               FOR ALL ENTRIES IN t_vepvg
               WHERE a~vbeln EQ t_vepvg-vbeln.
        SELECT vbeln
               kwmeng
               arktx
               matnr
               FROM vbap INTO CORRESPONDING FIELDS OF TABLE t_vbap
               FOR ALL ENTRIES IN t_vepvg
               WHERE vbeln EQ t_vepvg-vbeln.
    ENDIF.
    IF t_mvke IS NOT INITIAL .
       select matnr kwmeng from vbap into CORRESPONDING FIELDS OF TABLE
    t_brown FOR ALL ENTRIES IN t_mvke
               WHERE matnr eq t_mvke-matnr .
       select matnr kwmeng from vbap into CORRESPONDING FIELDS OF TABLE
    t_gold FOR ALL ENTRIES IN t_mvke
               WHERE matnr eq t_mvke-matnr.
    endif.
    l_len = strlen( l_text1 ).
    LOOP AT t_final INTO wa_final.
        READ TABLE t_vbap INTO wa_vbap WITH KEY vbeln = wa_final-vbeln .
          IF sy-subrc = 0.
              wa_final-kwmeng = wa_vbap-kwmeng.
              wa_final-arktx = wa_vbap-arktx.
             MODIFY t_final FROM wa_final .
              CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    LOOP AT t_final INTO wa_final.
        READ TABLE t_vbpa INTO wa_vbpa WITH KEY vbeln = wa_final-vbeln .
          IF sy-subrc = 0.
            wa_final-name1 = wa_vbpa-name1.
            MODIFY t_final FROM wa_final.
            CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    LOOP AT t_final INTO wa_final.
        READ TABLE t_brown INTO wa_brown WITH KEY kwmeng1 = wa_final-kwmeng
          IF sy-subrc = 0.
            wa_final-brown = wa_brown-kwmeng1.
            MODIFY t_final FROM wa_final.
            CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    LOOP AT t_final INTO wa_final.
        READ TABLE t_gold INTO wa_gold WITH KEY kwmeng2 = wa_final-kwmeng .
          IF sy-subrc = 0.
            wa_final-gold = wa_gold-kwmeng2.
            MODIFY t_final FROM wa_final.
            CLEAR wa_final.
          ENDIF.
        DELETE ADJACENT DUPLICATES FROM t_final COMPARING vbeln.
    ENDLOOP.
    PERFORM final.
    PERFORM ALVDISPLAY.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = EVENTS[]
    EXCEPTIONS
       LIST_TYPE_WRONG       = 1
       OTHERS                = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  final
          text
    -->  p1        text
    <--  p2        text
    FORM final .
      layout-no_input          = 'X'.
      layout-colwidth_optimize = 'X'.
      sort-fieldname = 'VBELN'.
      sort-tabname = 'T_FINAL'.
      sort-up = 'X'.
      sort-subtot = 'X'.
      APPEND sort.
      CLEAR sort.
    events-name = 'TOP_OF_PAGE'.
      events-form = 'ANY1'.
      APPEND events.
      CLEAR events.
      wa_fcat-fieldname = 'VBELN'.
      wa_fcat-tabname = 'T_final-VBELN'.
      wa_fcat-seltext_m = 'ORDER NO'.
      wa_fcat-outputlen = 10.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'VDATU'.
      wa_fcat-tabname = 'T_final-VDATU'.
      wa_fcat-seltext_m = 'SHIP BY'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat .
      wa_fcat-fieldname = 'NAME1'.
      wa_fcat-tabname = 'T_final-NAME1'.
      wa_fcat-seltext_m = 'CUSTOMER NAME'.
      wa_fcat-outputlen =  20 .
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'KWMENG'.
      wa_fcat-tabname = 'T_final-KWMENG'.
      wa_fcat-seltext_m = 'ORDER BY'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ARKTX'.
      wa_fcat-tabname = 'T_final-ARKTX'.
      wa_fcat-seltext_m = 'PRODUCT NAME'.
      wa_fcat-outputlen = 30.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'BROWN'.
      wa_fcat-tabname = 'T_final-BROWN'.
      wa_fcat-seltext_m = 'BROWN LBS'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'GOLD'.
      wa_fcat-tabname = 'T_final-GOLD'.
      wa_fcat-seltext_m = 'GOLDEN LBS'.
      wa_fcat-outputlen = 20.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
    ENDFORM.                    " final
    *&      Form  any1
          text
    form any1 .
      DATA header TYPE slis_t_listheader WITH HEADER LINE.
      DATA : l_date LIKE sy-datum,
             l_dat(15), l_mon(09).
      l_date = sy-datum.
      SELECT SINGLE ltx FROM t247
      INTO l_mon
      WHERE mnr = l_date+04(02)
      AND spras = sy-langu.
      CONCATENATE l_mon  l_date+06(02) ',' INTO l_dat.
      CONCATENATE l_dat l_date+0(04) INTO l_dat.
      header-typ = 'H'.
      header-info = 'REPORT NO : 11045'.
      APPEND  header.
      CLEAR header.
      header-typ = 'H'.
      header-info = 'PRODUCTION PLANNING REPORT'.
      APPEND  header .
      CLEAR header.
      header-typ = 'H'.
      header-info = 'ORDERS FOR THE WEEKEND :' .
      APPEND  header.
      CLEAR header.
      header-typ = 'S'.
      header-info = l_dat   .
      APPEND  header.
      CLEAR header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = header[]
      i_logo                   = 'ENJOYSAP_LOGO' .
      I_END_OF_LIST_GRID       =
    ENDFORM.                                                    "any1
    *&      Form  alvdisplay
          text
    -->  p1        text
    <--  p2        text
    form alvdisplay .
      repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = 'ANY1'
      I_CALLBACK_HTML_TOP_OF_PAGE       =
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = layout
         it_fieldcat                       = fcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       IT_SORT                           = sort[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
       I_SAVE                            = 'X'
      IS_VARIANT                        =
       IT_EVENTS                         = events[]
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = t_final
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " alvdisplay
    Thanks,
    Sudhir

    HI,
    I dont really understand what exactly you are looking for but from what I understand....
    Take another field in you table with YYYYMM....pass IT_SORT with this field sorted..into a grid you will have a list which is sorted by month...for weekly you need to work a bit more by explicitly finding the week of the record created and using the same field..
    hope this helps.
    santhosh

  • Presenting data on a daily or weekly basis in Management Cockpit

    Hello all!
    I'm working at a manufacturing company that needs to follow up production data at a daily or at least at a weekly basis. Is it possible to present data on these levels in Management Cockpit or are the only options month and year?
    Regards,
    Peter Estberg
    IT-department
    Sapa Profiler AB
    Vetlanda
    Sweden

    Hi
    If your taking report from SEM / BW, whichever server your taking report there you have to create a time variable for week
    You have to do a little bit workaround for this
    Create time char for CALWEEK
    Write coding in update rules to feed them - feed directly if source is having calweek values,
    If not you have to write a routine referring the available time charrs
    Then inculde this in time char in your data target and in the query and in the selection screen of the query
    To include in the selection screen you need to create a variable for selection referrring this time char for week
    Hope this helps
    Regards
    N Ganesh

  • Exchange rate on weekly basis/ monthly basis

    Hi all,
    My requirement is fetching of exchange rate ( TCURR-UKURS ) on weekly and monthly basis
    based on the condition
    GDATU = during the month, consider rates from the first day of the month until the interface execution date
    Example:
    Interface execution on 08.07.2010 = consider rates from 08.01.2010 to 08.06.2010
    WEEKLY JOB: The program will be executed every Saturday / D-1 during the month;  
    THE MONTHLY JOB: must be executed on the first business day of the following month (D-1)
    Be aware when the first business day is on a Monday, such as on the 3rd, in which case the rates would be (D-2) 
    Please tell me how to take the date value based on teh above condition.
    Thanks in advance

    Hi Rocky,
    You need codeplex task schedule adapter.
    You can follow this link explaining how to use scheduler adapter
    http://connectedenterprise.wordpress.com/2011/09/26/the-very-useful-biztalk-scheduled-task-adapter/
    It has option to activate your receive location on weekly basis at a defined time window.
    This will surely help.
    Rachit

  • How to find total row count on weekly basis

    I have written a join query which works perfect and it give me total number of rows between two dates, however is there a way where i can modify my query so that i can see the result on weekly basis from January 2014 to may 2014
    ;WITH SourceData
    as
        SELECT tablet.Approach.ApproachId
        ,StartDateTime
        ,QuestionId, Stage
        FROM Tablet.Approach
        JOIN tablet.DataCapture ON tablet.Approach.ApproachId = tablet.DataCapture.ApproachId
        WHERE QuestionId in (9,10)
        and Stage = 2
        and StartDateTime between '2014-01-01 00:00:00' and '2014-05-20 00:00:00'
    ,RecordCnt
    AS
        SELECT COUNT(ApproachId) AS TotalInformationEffectContacts
        FROM SourceData
    Select * from SourceData Cross join RecordCnt
    order by StartDateTime asc

    Use GROUP BY datediff(ww,@startdate,@enddate)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Report with rolling periods

    Hi
    We have a requiremt of generating reports with a rolling periods functionality. The report has to return data for the recent one year ( eg., if today is 30 Aug 2007, the report should result data from 31 Aug 2006 to 30 Aug 2007).
    We are using XMLA connector to build the query definition as we want to have coustomized reports and do not intend to use standard BI reports.
    Please let us know how the rolling periods functioanality can be developed within Visual Composer.
    Thanks
    Kiran

    Hi Raju,
    I apologize if you have mistaken my query. I am not referring to deletion of data from the data target. I wanted to know if we can can execute a report in VC which fetches data for the current one year. If we were using standard/customized BI reports we could have had the dynamic selection of the filter value using variables. But in our scenario we are developing queries using XMLA connector through the BI integration wizard. In this process we dont find a flexibility to have dynamic time periods (like the report fetching latest one year data). We would like to know if this functionality can be developed in VC through some functions.
    Thanks
    Kiran

  • Any BAPI for calculating Previous Period Balances?

    Is there any BAPI for calculating previous period balances my period is 04 and have to display 123 period balances.
    please help.
    Moderator message: please search for available information/documentation before asking.
    locked by: Thomas Zloch on Oct 5, 2010 4:45 PM

    Well, did you even try via SE37 a simple F4 with BAPIBALANCE or BAPIACCBALANCE* will give you the answer....
    Regards,
    Raymond

  • HT4914 How long is the $24.99 subscription period for iTunes Match, nowhere does it show the time period?  Week, month year?

    How long is the $24.99 subscription period for iTunes Match, nowhere does it show the time period?  Week, month year?

    It's an annual amount - it's at the top of that page :
    iTunes Match requires an annual subscription fee of $24.99

  • HND disappears on a bi-weekly basis!!!!!!!

    SInce I bought this router and renewed the HND but ever since I renewed it, the HND mysteriously disappears on a bi-weekly basis.  I contacted Linksys and they said to reinstall.  Well, since the reinstall process takes over 1 hour (mostly due to its insistence to download the newest version even if you are trying to install this version !).  after 4 reinstalls, I am freaking tired of having to do this!!!   I followed up with Linksys via email a couple of weeks ago but got no response.  This is a serious product flaw and must be fixed!
    I bought a Linksys router against my better judgement because I wanted to the HND capabilities which are pretty good (except need to be able to see URLs that trigger Parental Control events and have more control over time controls).  I sure how Netgear comes out with something similar soon.

    This isme under a new name,  Here it is, less than 2 weeks later and the HND part of LELA has once again gone away for no apparent reason.  HND appears to be working but "configure security" option on devices is gone and HND doesn't show up under TASK/TOOLS.  Had to reinstall again!!!!!!!!!!!!!!!!  I hate LINKSYS.  Luckily, I finally figured out that I only have to uninstall/reinstall LELA on client to fix, but I have to set up the names for my devices again (it remembers the security setting) and relogin to admin account.  This is a pain in the **bleep**.  Can't someone at LINKSYS come up with a fix.  I rue the day that I bought this.

  • HT1430 I am having to restore my iPhone on a weekly basis and it is going black on a daily basis- this is ridiculous! Is this normal for an apple product?

    I am having to restore my iPhone through my iTunes account on a weekly basis and the screen is going black on a daily basis and just turning off suddenly. This is ridiculous! Is this normal for an apple product?

    That is obviously not normal. I would make an appt at an Apple store to get it checked.

Maybe you are looking for

  • Print to PDF 9.0 - NOT working QuarkXpress

    I recently got a new iMac and also purchased the CS4 Design Premium Suite (including Acrobat 9.0) and QuarkXpress 8. I am having trouble "printing to PDF" in QuarkXpress. I tried printing to PDF in other programs, like Word, Excel, etc., and they all

  • External Hard drive is randomly popping on and off

    Hi. You guys are awesome by the way. We need to set up a tip system, where I can paypal something into an account for you... coffee cards or something, maybe itunes songs! One of my external hard drives is randomly disconnecting and then reconnecting

  • Custom screen saver idle time

    Is there a way to set a custom screen saver idle time? Through terminal? I tried "defaults -currentHost write com.apple.screensaver idleTime 160" for 3 minutes but that makes it go to 20 when I view it in preferences... lol, wow. This is hilarious. I

  • Parse and display xml doc when click on JTree node?

    Ok so here is the code that I have now. You will have to make alot of html files to run the program, but they can be empty for now. What you can do is just put the same exact html file to be displayed in each node element. for example. DefaultMutable

  • Installing anc configuring Mysql 4.0.x or 4.1.x

    Hi ive got Solaris 10 installed and configured however im having major dramas with the installation of Mysql 4.0.21 which i downloaded from sunfreeware, ive installed using pkgadd and all seems well, but when i try to start the mysql service or mysql