Forumla Variable with Exception Aggregation

  Hello,
I've CKF in BEx, in this CKf there is replacement path Formula variable calculating number of documents.
Formula variable is replacing the value of Document number infoobject.
So definition of CKF is -> Replacement path Formula variable *1
Ckf is restricted to summation with  Exception aggregation on Document number.
This implementation is working fine but issue is its taking lot of time in query ,like while checking RSRT olap :data transfer(Event ID) is taking lot of time,majority of the query execution time and counter is going somewhere around 100K.
Do you know is there a way we can implement this count in transformation?
Thanks in Advance!

Hi,
Doing SUM in transformation takes a long time as you need to read all the content in target.
So it is better to fine tune the query.
1) Is query running long time for small selections ?
2) Trace the query in RSRT and check where it is taking long time like Data base level , Application level
Thanks
Jagan

Similar Messages

  • Query Problem With Exception Aggregation

    Hello,
             I have two I/O 0Customer and 0Cont_Acct and also I have a Infoset made out of both. Here is the problem i am trying to solve,
    I want to figure out the customers who has more than five contract accounts associated with each customer number.
    Here is the solution I approached....
        1) Created a formula variable counter on the KF # of data records (which is provided in the Infoset automatically ) with exception aggregation total while referencing the contract acct I/O.
       2) Kept my customer #  and Contract acct on my rows area.
    The results I am getting is less than satisfying.  I am expecting   this output below.
    Customer #                 Cont Acct                  Total No of Cont.acct
    A                                  1001                                1
                                         1002                                1
                                         1003                                1
                                                                                  3
    B                                  1007                                 1
    I would appreciate anybody's help in this.  Thanks a lot.
    -A

    Hi,
    We have the same problem and raised an OSS ticket. They replied us with the note 1257455 which offers all ways of improving performance in such cases. I guess there s nothing else to do, but to precalculate this exception aggregated formula in data model via transformations or ABAP.
    By the way, cache can not help you in this case since exc. agg. is calculated after cache retrieval.
    Hope this helps,
    Sunil

  • Non Cumulative KF VS Normal KF with exception aggregation

    What is the purpose that is served by "non-cumulative key figures" and is not served by "normal key figures with exception aggregation"?
    Inflow and Outflow can also be mapped into a single key figure at update rules level.
    Why un-necessary complications like two additional KFs and marker update etc?
    Why can't we store actual inventory value on daily basis in a NORMAL key figure with exception aggregation on time?
    Also, I heard that data amount will be huge if you don't use non-cumulative key figure. I am not able to understand why?
    I HAVE ALREADY GONE THROUGH ALL THE HELP DOCUMENTATION AND ALL THE PREVIOUS THREADS. I DID NOT GET ANSWER TO THESE QUESTIONS.
    THANKS IN ADVANCE,
    Anup

    Anup,
    Q1: Why can we not store the actual inventory against the person -
    In this case you will end up storing day wise information of stock for the person / material - this will lead to increase of your data volumes depending on the scenario.
    Example :
    Day Level stock only
    Record Structure :
    Material | End of day snapshot Stock| date
    pipe | 100|20.2.2008
    pipe|100|21.02.2008
    pipe|100|22.02.2008
    pipe|80|23.02.2008
    Here you can notice that the material pipe has been sold on 23.03.3008 and no sale has happened previously - however since your extractor will give you end of day stock for all materials you will get 2 additional records
    In an opening and closing stock scenario
    Opening stock
    Marker|
    pipe|100|20.02.2008
    opening stock|closing stock
    pipe|100|100
    pipe|100|100
    pipe|100|80
    Here the values will get overwritten and compared with the marker and calculate that the stock is 80 or 100 depending on the date. I am not able to give a proper example but hope I have addressed it in part.
    Also it is a Non *** KF because if you look at stock for pipe over 3 days you will get 300 in the first scenario - this is wrong
    and for the next scenario with opening and closing stock
    it will ideally be
    100 ( your marker) -100100-100100-100+80 = 80
    this calculation is done at runtime and gives the right output.
    In the other case you can check stock only on a date basis and with the assumption that the stock data is current for that day.
    Hope it addresses youor question.
    Arun
    Day 1:

  • Problem with Exceptional Aggregation

    Hi Gurus
    I have problem with Exceptional Aggregation.I have a cube which as following data
    Plant , Fromcostcenter,ToCostcenter, g/l,fiscalyear/period, allocation %,amount
    1             101234            102355       888881      001/2006            10       1000
    1             101234            102355       888881      002/2006            10       1000   
    1             101234             102345      888882      001/2006            10       1000
    1             101234             102346      888893       001/2006            90      1000
    1             101234             102346      888893       002/2006            90      1000
    1            101234             102346      888984        001/2006           90       1000
    I need summarized report as follows
    Fromcostcenter tocostcenter  allocation%
    101234                   102355         10
    101234                   102346          90
    But iam getting report as follows
    101234   102355  30
    101234   102355  270  
    The allocation% keyfigure should not be accumulated, so for this i specified Exceptional aggregation but not worked.
    Any Suggestions,please help me.
    Thanks
    Raghu

    Hi
    I am also having same problem. Did you get a solution for your problem? Can you please tell me how did u manage to display 10 and 90 instead of 30 and 270?
    I also tried exceptional aggregation if more than one value. but not working.
    Thanks

  • Query issue with exception aggregation

    Dear all,
    I have to solve the following reporting issue with BEx:
    Cube Structure:
    Cube A:
    Characteristics: Company Code, Article, Distribution Channel, Customer, FiscalYear/Period
    Key-Figures: Sales Val., Sales Qty.
    Cube B:
    Characteristics: Company Code, Article, FiscalYear/Period
    Key-Figures: COGS
    I simply want to multiply:  Sales Qty@COGS = NODIM(Sales Qty) * COGS,
    but this calculation should be valid for all characteristics of my cube A, even if I do not have them available in Cube B (like Customer and Distribution Channel). Additionally the calculated totals of my characteristics must be correct so that I can apply in second step a Margin Calculation: Sales Val. - Sales Qty@COGS which is valid on single level, as well as on total level.
    I started to setup calculated key-figures
    COGS1 = NODIM(Sales Qty) * COGS   with Exception aggregation TOTAL by Company Code
    COGS2 = COGS1 with Exception Aggregation TOTAL by Article
    and this worked fine for both characteristics. If I use COGS2 in my report I get correct figures in a drilldown by Company Code and Article.
    I enhanced the calculation by
    COGS3 = COGS2 with Exception Aggregation TOTAL by Distribution Channel, but the result in this case is 0. I guess the result is 0, as the characteristic Distribution Channel is not availble in Cube B.
    Any ideas how to solve this? Is there probably a different (more elegant) approach, as I fear that having all the exception aggregations my query runtime/ressource consumption will be awful.
    Thanks for any idea,
    Andreas

    Hi,
    You should define a new selection for COGS having Constant Selection on DC as defined in following link for PRICE with CUSTOMER.
    [http://help.sap.com/saphelp_nw70/helpdata/en/46/91f0f090ea13e8e10000000a155369/content.htm]
    and then apply your formulas....
    hope it will solve the problem...
    Regards.

  • Formula Variable and Exception Aggregation

    Hello
    Please can you explain me how this works.
    There is formula variable created on a change date.(Replacement Path) with replace with Key.
    Then this formula variable is put in a formula as NODIM(Formula Var) and the exception aggregation is set as Total with Ref Char selected on the same date(Change Date).
    Now this is coming up with values like 2202374. If i remove the exception aggregation then i get an X in the values. If i then include the change date in the rows i get the date.
    Please can anyone let me know how this would be working. Effort Appreciated.
    Thanks

    Here is a scenario that might fit:
    Formula is trying to show the latest change date without adding it as a drill down. The only discrepancy is that the exception aggregation would need to be set to maximum value instead of Total.

  • Query Performance with Exception aggregation

    Hello,
    My Query Keyfigures has exception aggregation on order line level as per requirement.
    Currently cube holds 5M of records, when we run query its running more than 30min.
    We cont remove exception aggregation.
    Cube is alredy modeled correctly and we dont want to use the cache.
    Does anybody can please advice if there is any other better approach to improve query performance with exception agg?
    Thanks

    Hi,
    We have the same problem and raised an OSS ticket. They replied us with the note 1257455 which offers all ways of improving performance in such cases. I guess there s nothing else to do, but to precalculate this exception aggregated formula in data model via transformations or ABAP.
    By the way, cache can not help you in this case since exc. agg. is calculated after cache retrieval.
    Hope this helps,
    Sunil

  • Problem with exception aggregation

    Hi forums,
      Can any one help in this issue?
    We checked the data in the ECOM cube for the order 63349312 where it is giving 6 records eventhough we are deleting the adjacent duplicates of the order number in the start routine. (Is it like the deletion of adjacent duplicates happen in data packet level instead of happening in the entire cube level? B'cos the same order might present in the different packets.)
        Hence the data is aggregating for the key figure, 'Number of Days' in the ECOM report. But if we check the keyfigure properties in the RSA1, there we selected the Exception Aggregation as 'First Value' and aggregation reference char as 'ZN_CORD' (Order number). Still it is aggregating the number of days value in the report.
    Regards,
    Charan.

    Hi Rohit,
             We are doing same procedure as you mentioned. We assigned order number as refer characteristic to keyfigure No. of days in infi object level. But this operation is not working in report level
          Order number     ZCUDATE                  ZN_GSTRP            ZN_CORDKF     ZN_DAYSKF
            63349312     18.01.2009     01.10.2008     1,000     109
            63349312     18.01.2009     01.10.2008     1,000     109
            63349312     18.01.2009     01.10.2008     1,000     109
            63349312     18.01.2009     01.10.2008     1,000     109
            63349312     18.01.2009     01.10.2008     1,000     109
            63349312     18.01.2009     01.10.2008     1,000     109
    I want o/p as
    Order number     ZCUDATE                   ZN_GSTRP               ZN_CORDKF     ZN_DAYSKF
            63349312     18.01.2009     01.10.2008     1,000     109
    but it is showing as
    Order number     ZCUDATE                      ZN_GSTRP     ZN_CORDKF  ZN_DAYSKF
            63349312     18.01.2009     01.10.2008     1,000            676

  • How to format the report with the aggregated value

    Hi,
    I have 2 characteristics and 3 KFs in the infocube.
    First field is Cost Center
    Second field is creation Date
    3rd field is KF1
    4th field is KF2
    5th field is KF3
    I have put the date field( in the row) as this is required for calculating formula for KFs. But I have set that as No display.
    The date in the info cube is as follows.
    Cost Ceneter  Date( no Display)   KF1     KF2      KF3
    CC1           01/01/2006          100     150      200
    CC1           02/02/2006          75      100      95
    CC1           05/02/2006          125      95      125
    CC2           01/02/2006          75       25      85
    CC2           02/02/2006          85       65      10
    As the Date field is in query set to No display so the date appearing in the report is as follows
    CC1       100        150        200
              75         100        95
              125          95        125
    CC2       75           25        85
              85           65        10
    But I want the aggregated value at cost senter level i.e.
    CC1       300         245       420
    CC2       160         90         95
    I can not remove the Date frield from query as there is a formula variable defined on the date field.
    Please let me know how to bring the report to the required format.
    Bill
    Message was edited by:
            Bill Bryan

    If you are in new Bex, you can do it.
    You will have to create another (set of) CKF on top of the current ones (which do exception aggregation on DOCNUM) and set the exception aggregation on date.
    Say you have
    CH1--CH2CH3--CKF1
    To have a 'before aggregation' behavior for CKF1 when CH3 is not present, you will create a CKF2 = CKF1 with exception aggregation on CH3.
    Now, if you want to remove CH2 and have the 'before aggregation' behavior you will need to create another CKF3 = CKF2 with exception aggregation on CH2.
    ie for each level of aggregation, you will have to define a new CKF/Formula with corresponding exception aggregation - this is what will be needed to get you your output.
    Message was edited by:
            Ajay Das

  • Exception Aggregation help in Bex !

    Hi Experts
        Iam creating a query with date calculations. I have the following calculations in my qry...
    1 . Cycle Time      :  ( Doc Date - Quote sent date) ....I created two replacement path variables and use them in formula.
    2 . Nr of Quotes    :  ( Count of all sales orders with Block L1 & L2) ...I created a CKF for counting the nr of docs then used that CKF in an RKF to filter by block. 
    3 . Avg Tender Time :  ( Nr of Quotes / Doc date - Quote rec Dt) .........Created a formula same as 1 with Quote rec dt instead of Quote sent then created another formula to make 2/3.
        Now when I execute the query Iam getting numbers but
        Cycle Time I took Exception Aggregation as Counter for all detailed values and ref char as Doc Date....Its giving some nr as output...but my question is if I take doc date as Ref char how it gets the calculation from replacement
        Does any one have worked on date calculations as the above situation / any one have any how to's which explaines how to find date calculations with exception aggregations?
    Thanks in advance...

    fixed

  • Exception aggregation for averaging

    Hello,
    I am having some issues understanding how to model key figures with exception aggregation.
    For example: Lets say that I need to filter by age of employee per cost-center and calculate the average age of all employees belonging to each cost-center.
    What is the appropriate way to model this in a report. Exception aggregation or variable? Is there any justification on which way to model this?
    Any thoughts?
    Regards to all

    Ideally model the same in the query because if you model the same at the Key figure level - you cannot change the same without deleting data. Also if you model the same at the query level you can change the aggregation behavior depending on requirements.

  • Exception Aggregation (Average) displaying incorrect values after EHP1 Upgr

    Hi All,
    Exception Aggregation (Average) displaying incorrect values after EHP1 Upgrade in our BW system
    We have recently upgraded the system to EHP1. After the upgrade some of the queries where we are using Exception Aggregation (Average) started giving the incorrect values.
    Eg. We are displaying three Key Figures KF1, KF2 and KF3 (=KF1 %A KF2) against Store Hierarchy. In KF3 we are using Exception Aggregation (Average) on a characteristic 0PLANT.
    There are 14 rows against 0PLANT and out of those 2 rows are blank for KF1, so for KF3. When it is calculating the average of these key figures its dividing the total value by 12 instead of 14 which is not correct in our case. Earlier it was dividing the total by 14.       
    So in this case 'Average' and "Average of all values <>0" are behaving the same way.
    Kindly provide some inputs on this.
    Best Regards,
    Sachin Verma
    +44 7506740018

    Hi,
    Thanks for viewing the thread. And happy to let you know that the issue was resolved.
    The solution was:
    Two formulas (local) were created, one including the formula variable with replacement path for ZD1, with exception aggregation on ZD1, and the other with formula variable with replacement path for ZD2, with exception aggregation on ZD2. Both these formulas are hidden.
    Another formula (local) was created for u2018time takenu2019 = formula with ZD1 u2013 formula with ZD2, with exception aggregation total on u2018ZDOCNOu2019.
    For the second instance, when one requires exception aggregation on records that has multiple values for keys, a nesting of formulas can be done displaying only the ones required.
    For e.g. a formula with exception aggregation on say characteristic u2018item no.u2019 can be hidden, and included in another formula for exception aggregation on characteristic u2018document no.u2019. This is a typical case where one can achieve calculation before aggregation for a calculated key figure, formula or a counter.
    Hope it might help someone, and saves time and effort for a similar issue posted.
    Also would like to keep this thread open for exploring better solutions.   
    Regards,
    Vijay

  • Report with double aggregation

    Hello
    I need to produce the following reports :
    Material Group Counter
    MG1                    12
    MG2                    30
    The counter counts the numbers of materials of respective material group whose sales are higher than value entered by user.
    The report should first be aggregated up to material level and then up to material group level.
    Key figures with exceptional aggregation dont help. Calculation before aggregation isnt supported any longer in SAP BI 7.0.
    Virtual key figure or cube based on FM?
    Thanks

    no answer

  • Exception aggregation - Last Value

    Hi,
    We are having requirement where we have a table in non R/3 system for SKU - Customer level closing stocks on particular day are maintained. We want to create a cube for the table in BI. This table contains entries for SKU + Customer for diff days. We want to show the closing stock of last(/latest) day for which Customer+ SKU record exists. To achieve this we have used Calculated Key figure on Closing stock with Exception Aggregation - Last value with ref to Calendar Day.
    It woks fine only if I have Customer & SKU both used in query. But we have to show these stocks aggregated on Plant level. (Customer are linked to Plants and it is directly avbl in our cube). In this case aggregation does'nt work.
    Lets say following are the closing stocks for SKU- M1 & 3 customers from Plant = 1101
              date-> 1/1/2007  2/1/2007  3/1/2007
    Cust1             10                           15
    Cust2                            20
    Cust3             25            
    In above case if i have to see closing stock on 3/1/2007 for SKU-M1 @plant 1101 (sum of latest closing stock @ all customer sites under plant 1101), i should get = 60 (152025). But it gives me 15 only.
    Could anyone explain how to design a query for this? Or in cube design/uploads it can be managed.
    Regards,
    Vikram.

    Hello Vikram
    One possible solution I can think of is to use an extra ODS in order to hold your data in an aggregated form that suits you. Unfortunately the exceptional aggregation behaviour does not work outside reporting thus in the transfer rules from your data provider to this new ODS you should add a formula checking whether the new record to be transfered to the ODS has a date newer than the ones already transfered in the ODS. Else it should skip the current record and proceed to the next one.
    Another possible solution would be to use the APD and transfer the results of the query you are already playing in an ODS (this way you take advantage of the exceptional aggregation behavior) and by transfering your records to a second ODS you can achieve the aggregation you need.
    Assign points if any of the above helped

  • Exception aggregation and Aggregates

    Hello,
    I have a Query (Material Stocks movements) with one key figure with exception aggregation by 0material. I build an aggregate to run this query faster, but I notice that with exception aggregation the query doesn't read the aggregate. When I run this query without exception aggregation, my query read the aggregate.
    Is it possible to run this query with exception aggregation on aggregates?
    Thanks,
    Fabio.

    Hi Brian,
    I already checked in RSRT + Debug, When you run RSRT + Debug appears both, the aggregate and Infocube, but if you see in SM50 the process read just the Infocube. My aggregate has all characteristcs from my query, including the characteristic that I'm using like exception aggregation.
    Thanks
    Fabio.

Maybe you are looking for

  • HT201210 Having two iPhones on one account

    How can you whipe an old iTunes account for a different iPhone??

  • Bridge CC file association default not working

    Greetings. I've recently upgraded to CC from CS6. Uninstalled and removed CS6 files properly (why have them on C:/ taking up space?). Ps, Ai, Id, all working properly (thank my lucky stars...), which are the three apps I use daily,... and Br, however

  • Flash and Acrobat 9 Pro

    I believe the installation of these two is causing problems. I installed Pro 9 first during a fresh install and Flash after. The Flash was downloaded and installed but everytime I try a streaming radio station the website gives an 'Install Flash' to

  • Why are my location services not working?

    I received a new iPod touch yesterday, and it is now running iOS 5.  I can't get the location services to work from my home.  On my old 2nd generation touch, they work perfectly.  I've check all of my settings regarding the location services and ever

  • Wireless Synchronization of Calendar, tasks and memos

    I'm a first-time user of a new Blackberry Curve 8310.  I've installed the software and completed a wired-synchronization to my computer.  Now, I want to set the device so that it synchronizes wirelessly.  I've followed the instructions that say Calen