Quarter level aggregation for formula

We are noticing discrepancies in calculation of qtd at quarter level (e.g. q12009 for a calculated formula). We use the following formula for calculating qtd amount and in example bleow the account type is 'E'. Can anybody advise the discrepancy seen.
IF CR_ID.ACCT_TYPE.ATTRIBUTE EQ 'E' THEN movingtotal(CR_CUBE_FIN.AMOUNT.MEASURE,(CR_PR_MONTH_IN_QTR-1)*-1,0,1,CR_PR) ELSE IF CR_ID.ACCT_TYPE.ATTRIBUTE EQ 'R' THEN movingtotal(CR_CUBE_FIN.AMOUNT.MEASURE,(CR_PR_MONTH_IN_QTR-1)*-1,0,1,CR_PR) ELSE NA
Below is a snapshot of key attributes in Period dimension.
CGF_PER_ID,CGF_QTR_ID,CGF_MONTH_IN_QTR
200901,2009Q1,1
200902,2009Q1,2
200903,2009Q1,3
200904,2009Q2,1
200905,2009Q2,2
200906,2009Q2,3
Snapshot of amount and QTD data (Notice the discrepancy in 2008q1amount and 2008q1 qtd amount)
     FIN AMOUNT                    FIN QTD               
     - 2008Q1     200801     200802     200803     - 2008Q1     200801     200802     200803
01     105630829972.20     7826639407.20     46946121193.20     50858069371.80     115410700418.70     7826639407.20     54772760600.40     105630829972.20

Original measure: CR_CUBE_FIN.AMOUNT.MEASURE
Create calc_meas1 for last along time calculation on CR_CUBE_FIN.AMOUNT.MEASURE (nov09 for qtr:2009Q3, dec09 for year:2009 etc.)
Create calc_meas2 for qtd calculations on CR_CUBE_FIN.AMOUNT.MEASURE (sum of months for qtr).
Create calc_meas3 for ytd calculations on CR_CUBE_FIN.AMOUNT.MEASURE (sum of months for year).
Create calc_meas4 for switching b/w
* calc_meas1 for account type 'A', 'L'
* CR_CUBE_FIN.AMOUNT.MEASURE for time_levelrel 'MONTH' and account type 'E', 'R'
* calc_meas2 for time_levelrel 'QUARTER' and account type 'E', 'R'
* calc_meas3 for time_levelrel 'YTD' and account type 'E', 'R'
You can expose only calc_meas4 in reporting layer (if desired/possible).
If you're using excel add-in etc, you can populate the description of calc_meas1, calc_meas2, calc_meas3 to something like " *** internal measure *** " and educate users not to use it for ad-hoc reports/calculations.
HTH
Shankar

Similar Messages

  • Aggregation plan/Skip level aggregation for model with a cumulative measure

    I have planning data in the following format.
    Project     Department Name     Task     Date          Units of work completed
    PRO1     DEPARTMENT1          Task1     01/01/2008     12
    PRO1     DEPARTMENT1          Task1     01/21/2008     3
    PRO1     DEPARTMENT1          Task1     03/01/2008     8
    PRO1     DEPARTMENT1          Task1               4
    PRO1     DEPARTMENT1          Task2     01/21/2008     5
    PRO1     DEPARTMENT1          Task2               9
    PRO1     DEPARTMENT2          Task1     01/01/2008     20
    PRO1     DEPARTMENT2          Task1     02/11/2008     6
    PRO1     DEPARTMENT2          Task3     01/15/2008     15
    Note: The rows having blank dates indicate remaining work for that task
    Based on user requirements, I have created a OLAP model as follows
    Dimensions:
    1. All Projects-->Projects
    2. All Department-->Department
    3. All Tasks     --> Tasks
    4. Year-->Month-->Day
    Measures:
    1. Total units of work (Irrespective of date)
    2. Cumulative units of work completed (Based on the date)
    If someone has worked on similar models before, I would be thankful if they can help me with
    1) An aggregation plan for these measures. (Basically, for my first measure, I would want to get a cumulative total across my time dimension, and for my other measure, I would like to see the total units, whatever date I pick, for example, for Dep1, Task1, this measure should show 27 on 01/01/08 and also on 01/21/08 and also when I roll up and look at year 2008, I still need 27 in this column)
    2) Is it ok to apply Skip level aggregation to this type of calculations, or would that result in some problems?
    Any and All suggestions to implement this are welcome.
    Thanks,
    Bharat

    Hi,
    Can you build time dimension to include as many years as your application needs (2000 to 2025 say)? Then you can simplify the model a lot by defaulting the records with remaining units -- the ones with no date -- with the last date in your time dimension (31-DEC-2025). So in a sense, you're loading them as if they'll be complete on 31-DEC-2025.
    Also you should have a grand total level (ALL_YEARS say) along time dimension which contains a single member which includes all the years.
    Cube with 3 dimensions: Projects, Dept, Task, Time and 1 Fact: Units
    You can use calculated measures to get the results you want
    1. Total units of work (Irrespective of date) ... reference top most member. Will include all -- completed and incomplete units of work.
    Expression: cube1_units(time 'ALL_YEARS_1').. or use olap dml function to get the last member programatically if desired... Alternate Expression: cube1_units(time limit(time to time_levelrel eq 'ALL_YEARS')).
    2. Cumulative units of work completed (Based on the date)
    2a: Create formula/measure which is a regular Cumulative summation of Units .... Note: you need a Period-To-Date calculation set to sum up all peers under ancestor at level: ALL_YEARS (instead of year)
    This will include all completed units until the day in question. Since incomplete units are on the last day, they will not count.. You may need to add a special check for the last day.
    Use another formula to reference 2a appropriately across all levels of time...
    Formula for Measure #2: if time_levelrel eq 'DAY' then 2a else 2a(time statlast(limit(time to bottomdescendants using time_parentrel time(time time))))
    For higher levels of time (above day), you should reference the Cumulative units of work for the last day of the relevant period. E.g. To get completed units of work for October 2011, you need to reference the value of 2a. for last day of the Month: 31-Oct-2011.
    HTH
    Shankar

  • No Aggregation Level Defined for Data Matrix ICHSM1

    Hey Folks,
    I see that there is no Aggregation Level defined for Data Matrix ICHSM1 ( the SMI cBook ).
    I now need to add new key figures to this Data Matrix. However, I am not being able to do so since there are no Aggregation Levels defined in the first place. There is no provision in IMG to define the aggregation levels.
    The view /SCF/VCBAGGLEV defines this. However, this view is not implemented to take in new entries.
    I do see a table /SCF/CCBAGGLEV. I input a value here for the aggregation level - Data Matrix mapping.
    However, this is not being reflected in the SPRO. I need it to reflected in IMG since, the next step to this would be to define a new Key Figure.
    All the other Data Matrices seem to have Agg Levels. Is this a bug in the standard? Any poin

    I see a correlation between the book ICHRPL1 and ICHSM1 internally...so for all practical purposes any configurations on ICRPL1 is being reflected to ICHSM1
    An addition here is that ICHRPL1 is the mastercbook for cbook ICHSM1
    Edited by: Puja Malhotra on Dec 16, 2008 12:00 AM

  • ASO Build Rule - "Level Usage for Aggregation"

    When Building ASO (9.3.1) Dimensions via Rules, we wish to set the “Level Usage for Aggregation” of a member in the data file.
    You can set a Rule Field Property to Aggregate Level Usage, though it not clear what value should be inserted in the Data File to specify one of the four options below for a member
    •     Consider All Levels
    •     Do Not Aggregate
    •     Consolidate Top Level Only
    •     Never Aggregate to Intermediate Levels
    Inserting the full name does not work and we cannot find any reference to the Aggregate Level Usage property in the Dbag.
    Can anyone advise on the correct property value’s required.
    Much Apreciated.

    From the DBAG here are you options for dimension builds with ASO applications
    % Express as a percentage of the current total in a consolidation (applies only to members of a dynamic
    hierarchy)
    * Multiply by the current total in a consolidation (applies only to members of a dynamic hierarchy)
    + Add to the current total in a consolidation (applies only to members of a dynamic hierarchy)
    - Subtract from the current total in a consolidation (applies only to members of a dynamic hierarchy)
    / Divide by the current total in a consolidation (applies only to members of a dynamic hierarchy)
    ~ Exclude from the consolidation (applies only to members of a dynamic hierarchy or members beneath Label Only members in a stored hierarchy)
    O Tag as label only
    N Never allow data sharing
    C Set member as top of a stored hierarchy (applies to dimension member or generation 2 member)
    D Set member as top of a dynamic hierarchy (applies to dimension member or generation 2 member)
    H Set dimension member as multiple hierarchies enabled (applies to dimension member only)
    Brian Chow

  • No drilldown option for Formulas in structure

    Hi Experts, Could you throw some light on the following issue.
    My char structure is as follows,I have a grouping done on GL and when i drill down I shd see the GL only for selections and not for formula i.e. the formula should not drilldown and show GL's.see the below example.
    Example,
    A - SALES(GL grouping)
    B - TAX &DUTIES(GL grouping)
    C - Formula (SALES  + TAX & DUTIES)
    For summarised report ,the above display is OK but when I drilldown and see GL level data,is there anyway to supress and make the formula as static(no drilldown for formula).
    Kindly guide me if there is any way out .
    Regards
    Raja Premsingh

    I think you only want to see the values for key figures A, B and C in the result rows and not in the details when you have a drilldown on GL, am I right?
    What you could do, is create a new calculated key figure to determine the number of GL's. You could use a formula variable with replacement path for constant 1 on GL, or created a a copy of key figure A with aggregation level GL and counting all values <> 0.
    Once you have a column with the number of GLs, create a formula like ( number of GLs > 1 ) * key figure A. This way, only the result rows will show values.
    Kind regards,
    Alex

  • Quarter Level Calculations

    Hi All,
    I am trying to write quarter level calculations but my base period is months. But i am not getting calculation option at the quarter level.
    Thankx in advance
    Edited by: user9174018 on Mar 11, 2010 2:02 AM

    If the calculation is done for specific accounts. You need to make those account as dynamic calc and write the calculation logic in the sub dynamic() sub routine. The value will be computed at the quarter level automatically. This is generally done for the ratio accounts which cannot be rolled up to the Parent period.
    Varun

  • Hide top level aggregation result

    Hi Experts,
    It is possible to hide intermediate results for aggregation using method SET_GROUP_AGGR_DISPLAYED of class CL_SALV_WD_CONFIG_TABLE (Interface IF_SALV_WD_FIELD_SETTINGS ).
    Is it possible to hide the top level aggregation? I only want to display group aggregations
    Thanks in advance
    Johan Kriek

    Hello experts,
    Is this possible?
    Regards,
    Johan Kriek.

  • Aggregation for MPOS

    Hi all,
    why and when we create aggregation for MPOS. can anybody explain.. Thans in advance..

    Hi, Chandra,
    The aggregation help to improve the performance by storing frequently accessed information at aggregate level.
    The data will always be stored at the detailed level in the planning area. If you need to access aggregate level data very frequently, the data can be stored separately at aggregate level by specifying aggregate in MPOS.
    So, in this way the access to aggregate data will be fastest since system doesn't need to do any data aggregation from detailed level.
    Working with aggregate data will need more memory!
    Thanks,
    Regards, Marius

  • How tro check : Bottom-up aggregation for PA retraction

    Hi Specialist's,
    As part of our implementation project we need to perform System Readiness Check
    and i need your guidance and help in few things:
    <b>Bottom-up aggregation for PA retraction</b>
    How can i go about checking this?
    usefull answers will definitely be rewarded with points .
    Thanks,
    Abhinav.

    Even in Multi-strucuture budget, system does not check that at any point of time budget at lower level Fund Center should not exceed the budget at upper level.
    It is a practical situation which system does not checking. Can anybody help in resoving teh issue.

  • Is there a way to create aliases for formulas without using other cells?

    I have long formulas in certain cells, that consist of a bunch of smaller formulas that I re-use in multiple cells. Is there a way to create an alias for a formula (or create my own function) that I can then piece together into one big formula? I think I can use another cell to drop the formula in, but that just clutters up the spreadsheet.
    Message was edited by: David Powers

    David,
    it looks like you can't define own formulas or create aliases for formulas.

  • How to set a new value for formula field in crystal reports xi?

    <p>How to set a new value for formula field in crystal reports xi?</p><p>//formula</p><p>{@description}</p><p> </p><p>exemplo in VB6</p><p>crxSubreport.FormulaFields.Item(1).Text =  "&#39;Subreport Formula&#39;"  or</p><p>crxSubreport.FormulaFields.Item("description").Text =  "&#39;Subreport Formula&#39;"</p><p>How to in JRC?</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 537, state 3, severity 16

    Hello,
    I've encountered issue during installation of SP1 to SQL Server 2012. After upgrade I'm getting this error in Event Log:
    Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 537, state 3, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline.
    If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script
    upgrade steps run to completion.
    Can someone point me direction how I can fix it? This is a production server and currently only way to make it working is to use T902 flag in SQL Server startup params. I've found some suggestions to check Data path if it exists but it does so this is not
    the issue here. Any ideas?
    I've found also here
    http://www.sqlservercentral.com/Forums/Topic1377073-1550-1.aspx#bm1378279
    suggestions for similar issue with SQL Server 2008 which that I should do:
    Via ssms:
    From msdb:
    Delete:
    dc_admin role
    Dc_operator role
    Dc_proxy role
    UlitityCMRReader role
    UtilityIMRReader role
    UtilityIMRWriter role
    but for not I didn't tried it yet. This is standalone SQL Server instance.
    Any help really appreciated.
    Regards

    Script returns the same error.
    System databases:
    1    1    760    -1    10    1048578    0    1    master        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf
    2    0    12768    -1    10    1048642    0    1    mastlog        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
    1    1    1024    -1    10    1048578    0    2    tempdev        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\tempdb.mdf
    2    0    64    -1    10    1048642    0    2    templog        C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\templog.ldf
    1    1    288    -1    128    2    0    3    modeldev    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\model.mdf
    2    0    4464    -1    10    1048642    0    3    modellog    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\modellog.ldf
    1    1    28936    -1    10    1048578    0    4    MSDBData    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBData.mdf
    2    0    3352    268435456    10    1048642    0    4    MSDBLog    C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\MSDBLog.ldf
    are all in place where path shows.
    Before sending my message I've searched update script for "FROM master.sys.master_files" and I found script which you are showing me. I've made some digging and when I runned:
           SELECT physical_name
           FROM master.sys.master_files
           WHERE (name = N'master')
    it returned also path to one my customers database name which has filename set correctly but it's Logical DB name is master and mastlog. I'm running shared hosting company and I allow my customers to restore their DBs from .bak files but I have no idea why
    this customers logical name is set to master and mastlog. Probably when I change this names update script will work as it should. On the other hand in my opinion there should be some kind of fail safe mechanism for situations like this one.
    EDIT: After changing logical name for DB and log for mentioned DB your script runned fine so probably now when I remove T902 flag and restart my SQL Server update will run correctly. Big thanks for resolving this issue.

  • Two production  orders at the header level one for one single requirement

    Hi Gurus, Please provide me your valuable suggestion on the issue.
    *Client wants to have a only two production  orders at the header level one for one single requirement .*
    1) Manufacturing Order u2013 In this order for Finsihed prodcut system should pick all the assemblies whcih are manufactured inside i.e depending on the material type.\
    2) Assembly order u2013 In this order system should pick all the assemblies whicih need to be assembled also procured or subcontracted items in this order against depending on the material type.
    It means for Sales order of  5 EA there is going to be only 2 order ( MFG & assy order).
    For Example.
    L45-7000 is the header material now client wants only two production orders one Manufacture order and anothe Assmebly order , thet dont want to use Phantom assembly concept and also multiple production orders for  SFG.
    Please confirm if this requirement can be mapped in SAP ?
    Thanks...

    Hi Shishir,
    As soon as each order is related to only one material, if your manufactured (or purchased) assemblies are of different materials, you will have a separate order for each material rather than a single order for all manufactured assemblies. I don't thing all your assemblies are of the same material - thus I would say no, it is not possible to map your requirement.
    Regards,
    Sergiy

  • N level-Approval for contract workflow (WS14000148) in SRM

    Hi SDN'rs
                  I want to activate N level-Approval for contract workflow (WS14000148) in SRM  
    When I am creating the contract in SRM I can see the approvers in the approval preview.
    But when I release the contract and look at the approval privew there are no approvers
    and the status of the contract is released.
    We are on SRM Server 5.5 and SP 07.
    Here what I did
    1. I implemented the BADI 'BBP_WFL_APPROV_BADI' using the sample implementation and populated the approvers.
    2. I activated events SAVED,CHANGEVERSIONSAVED for WS14000148 in OOCU transaction.
    3. I see event linkages for WS14000148 for both events SAVED,CHANGEVERSIONSAVED in SWE2 transaction.
    4. I assigned role SAP_EC_BBP_PURCHASER to for subworkflow N step for contract WS14000147.
        ( User who is creating contract has this role)
    5. Consistency check for WS14000148 is green and WS14000147 is yellow in SWUD
    6. Event simulation for BUS2000113 and events SAVED,CHANGEVERSIONSAVED shows WS14000148 successfully started.
    I see dump in ST22 with errors TSV_TNEW_PAGE_ALLOC_FAILED and SYSTEM_NO_SHM_MEMORY with WF-BATCH is this any thing to do with that?
    If any one know what are the steps I am missing please let me know.
    Thanks
    A S

    Hi
    Please refer to these OSS notes which might help.
    <u>Refer to following OSS Notes -></u>
    Note 735026 - Memory problems at BBP_GETLIST_INDEX_FILL
    Note 932836 - BBP_GETLIST_INDEX_FILL: Activation not possible
    879528 WS14000148: Send mail to initiator incorrect
    901200 WS14000148 dia wrk item despite NO_FURTHER_APPROVAL_NEEDED=X
    879873 BUS2000113: The Object_ID attribute may be empty
    903015 BAdI Workflows: Events and parallel steps
    901068 BAdI Workflows: Enhancement of Note 896556
    769458 Dynamic workflows: No adjustment after document change
    972757 Occurence of the SYSTEM_NO_SHM_MEMORY runtime error
    741864 FinBasis: Termination TSV_TNEW_PAGE_ALLOC_FAILED
    864473 Deactivating the shared memory when searching by prefix
    928642 Container factory: Shared memory dump update
    Refer to these links.
    <b>http://help.sap.com/saphelp_srm50/helpdata/en/2c/e68d406b305537e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/26/0f8b41ed891609e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/6b/eca441eea7ef0be10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/f7/a6a3415e34b05fe10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/6b/eca441eea7ef0be10000000a1550b0/frameset.htm
    </b>
    <u>Also raise an OSS message with SAP as well.</u>
    Regards
    - Atul

  • Default multiple values for formula variable on variable selection screen

    Hi All,
    Suppose 'A' is formula variable with customer exit as processing type then i want four default values for this variable eg: 3, 6,9, and 12 as selection options, when we will execute query user can able to pick any one of the default value.
    is it possible in BEx for formula variables?
    I also tried with ABAP code in 'cmod' t-code, but it is not working properly for 4 default values....but for single default value, code is working fine.
    I am using following code ::
    When 'ZCSIMCTB'. // variable name
    IF i_step = '1'.
    CLEAR : l_s_range.
    l_s_range-low = 3.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR : l_s_range.
    l_s_range-low = 6.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR : l_s_range.
    l_s_range-low = 9.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    CLEAR : l_s_range.
    l_s_range-low = 12.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    Thanks in advance

    Hi Sankar,
    Thanks for reply...
    With single quotes also its not working.......
    Also as I am using Formula Variable so by default "Single Value" is coming on Variable Details....
    Regards,
    NIlesh

Maybe you are looking for

  • Memory speed after upgrade

    I recently bought an 11,3 iMac with the Core i7 2,93Ghz CPU and 4GB of RAM. The system profiler reported the RAM working at 1333MHz which is right. I then bought another 2x2GB modules with the same specifications (DDR3 1333MHz), but after installing

  • Linksys Wireless Print Server & HP Printer

    Does anyone know if I can use my Linksys wireless print server which is attached to my HP All-in-One Inkjet printer for printing on my MacBook Pro? When I go to add a printer, nothing is detected - neither the HP or the Print Server.

  • Proper setup of the IDM Account in SAP Backend

    Hi there! On my current project, I am being asked about the proper setup of the SAP Account that IDM will use to provision users in an ABAP system. What T-codes, objects, and values do you use?  Do you assign any specifc roles? Thanks for your help!

  • I am unable to activate my New iPhone 4S

    I am unable to activate my New iPhone 4S

  • SDK 1.3.1.03 SETUP /SMS error on W2k

    On W2K, after clicking on the SDK file, the files are extracted to the TEMP directory but then I get the following errors. Unable to Execute! "C:\TEMP\pft81~tmp\disk1\SETUP.EXE" /SMS PackageForTheWeb Error Unable to execute the specified command line