How to calculate key figure before aggregation for complex formular?

Hi, buddies
<b>Here's the simplified senario</b>:
I have a cube, in which the characteristics are 'Calendar Day' and 'Hour' (values are 01~24), and the key figures are stored by day and by hour.
What I need is very simple, a query to display calculated key figures only by Calendar Day. I don't need Hour information.
So I create a query: column charact is Calendar Day, rows are several calculated key figures.
<b>Now the problem is that</b>:
if I don't put 'Hour' as row in the query, I'll get WRONG result. But if I put 'Hour' as row in the query, I'll get CORRECT result, but all the 'Hour' details will display, which should be hided.
<b>I know the reason is that</b>:
the calculated key figure that I create should be calucated before aggregation, not after. But since the formular is pretty complex, I can't change the 'Time of Aggregation Calculation' in key figure's property. (It's greyed out.) So I have to put 'Hour' as row in the query to force calcuation 'before aggregation' in query and set the property 'Calculate Result As...' as 'Summary'.
<b>My question</b> is:
whether there's any other way to force calcuation 'before aggregation', so I don't have to put 'Hour' in the query.
If no, is there a simple way to hide the 'Hour' details and only display summary result ON THE QUERY LEVEL? (
<i>I can hide detail lines by using web template, or maybe using VB in excel. But I can't use either of them. I want to hide the details on the QUERY LEVEL. So I can use the query directly in any other reporting tools, like Visual Composer.</i>)
Any idea?
Wei

Hi, Sudeepta
Thanks for your reply.
I did try to set 'No display' for 'Hour'. The result is that the Characteristics 'Hour' doesn't appear on the query result, but the detailed line of key figures still display on the result. It looks like the followings: (I put summaries on the top/right)
Date  1/1  1/2  Overall result
KPI1    10        11   22  (sum line)
KPI2    20        21   41  (sum line)
KPI1    12        13   25  (detailed line)
KPI2    13        13   26  (detailed line)
KPI1    11        12   23  (detailed line)
KPI2    12        12   24  (detailed line)
I want to suppress all the detailed lines and leave sum lines on the result.

Similar Messages

  • Calculated key figures before aggregation

    Hi,
    I'm having trouble creating a new calculated key figure. Here's the situation.
    I have two key figures: stock, value A. Now I want to create a new calculated key figure (in 3.x) using both key figures. The calculation would look something like: "stock * (value A == 0)". Now I want this key figure to work before aggregation. When creating this calculated key figure however I am unable to set the aggregation setting to before aggregation. Now, with any other key figure besides stock, this is no problem. Something like "profit * value A == 0)" works fine and I can set the aggregation setting to before aggregation. I suspect the reason I can't use stock in a calculated key figure set the calculate before aggregation is because of the exception aggregation of the stock key figure. It's set to last value in exception aggregation.
    Does anyone know how to solve this problem? Thanks in advance.
    Alex

    Hi Alex,
    please read this:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62f8e07211d2acb80000e829fbfe/frameset.htm
    The reason that somtimes the propertie is available or not depends on the key figure type - e.g. if it is complex or not. I think that here is a lot of info available in the forum.
    Regards,
    Adem

  • How to filter Key Figures - not using the GUIDs

    An example How to filter Key Figures may look like this:
    http://XXX.com:8000/sap/bw/BEx?sap-language=DE&bsplanguage=DE&CMD=LDOC&TEMPLATE_ID=XXX&FILTER_IOBJNM=41F68RV4ZB5VYSARODYU70CAQ&FILTER_VALUE=41F68SAI18DB01DO023IR49QA
    The GUIDs consume the space in the URl. Is there a way to work with an alias.
    To use the technical name of a Key Figure defined in the Query does not work.

    Hi Cherie,
    This is exactly the type of problem that I'm currently trying to figure out. I'm trying to following your solution but I'm not clear on how you actually achieved this in you last note. I want to dynamically select actuals/budget column fields based on what period I enter. I thought about creating 12 separate RKF fields for actuals and 12 separate RKF fields for the budget reforecast and outputting these all and then doing some VBA to hide the fields not required based on which period was selected... how is your variable ZFYAPER7 defined and calculated?
    Cheers

  • How to find key figures not created in a Structure.

    After using Where Used on a selection variable Z_FISCPER3_M_SV a list of Key Figures appear. I wish to amended these Key Figures as the selection variable used is incorrect. However, I cannot find these Key Figures in the Structure?  Does anyone know how to find Key Figures not created in a Structure.

    Thanks for such a quick response.
    I am assuming the following about the table :
    -     Column u201CCALDAYu201D contains a date value for each day the Index is active.
    -     Column u201CBIA_USEDu201D contains a value that is iterated for the given day each time the Index is used.
    -     Column u201CBIA_NOTPOSSIBLEu201D contains a value representing how many times a query could not access this Index.
    -     Column u201CNO_BIAu201D tells if a BWA Index exists at all on any of my BWA Blades
    -     Column u201CBIA_TECHINAu201D ????????
    -     Column u201CBIA_INAu201D ???????
    -     Column u201CDB_FALLBACKu201D ???????
    I am not sure if my understanding of the column is correct.  Can you tell me they are?  The columns with u201C???????u201D mean I have no solid understanding of how to use these columns at all.
    Thanks

  • Is there any way out in business explorer to calculate key figures

    Hi friends,
    I need your help to calculate key figure in run time, actually I have a infoset of billing item and stock transfer order (STO) with purchase requsition (PR) . one STO line no. is having multiple PR for example one STO line of 100 nos qty is having two different PR for 50, 50 nos. but in billing item there is no linking of PR only STO and STO line is there. I am having problem to calculate balance qty in case partial delivery for example if delevered qty is 10 then pending quantity should be 40 in first PR and 50 in second PR but it is showing 40, 40 in both. please help me out to resolve this.
    With Regards,
    Raman

    Hi Radha,
    If I am not wrong, you need to have the delivered quantity at the PR level in order to get the pending quantity per PR. Since delivered quanity is for the STO line item only, you can get the pending quantity for each STO line item and not the PR. You can get the correct values for the STO line items are using the query designer options.
    Regards
    Renu

  • BO( WEBI,QAAWS ) can't sustain bw query : create new calculate Key Figure ?

    BO( WEBI,QAAWS ) can't sustain bw query : create new calculate Key Figure ?
    I create three new calculate  Key Figure : TotalQty1,Rate1,TotalRate1  on bw query. Return values:
    TSAS defect1     Qty     TotalQty1     Rate1     TotalRate1
    weight inaccuracy     33.000     33.000     37.500 %     37.500 %
    poor function     10.000     43.000     11.364 %     48.864 %
    gap out of spec     9.000     52.000     10.227 %     59.091 %
    scratch  /crack/ dam     8.000     60.000     9.091 %     68.182 %
    broken glass/mat     5.000     65.000     5.682 %     73.864 %
    missing display     6.000     71.000     6.818 %     80.682 %
    assembly defect     4.000     75.000     4.545 %     85.227 %
    plastic deformed     4.000     79.000     4.545 %     89.773 %
    no function     4.000     83.000     4.545 %     94.318 %
    poor  printing     5.000     88.000     5.682 %     100.000 %
    But Create on universe  connect  to this bw query, I used QAAWS and WEBI to runat , TotalQty1,Rate1,TotalRate1   key figure values are Qty value, that is error:
    TSAS defect1     Qty     TotalQty1     Rate1     TotalRate1
    weight inaccuracy     33     33     33     33
    poor function     10     10     10     10
    gap out of spec     9     9     9     9
    scratch  /crack/ dam     8     8     8     8
    broken glass/mat     5     5     5     5
    missing display     6     6     6     6
    assembly defect     4     4     4     4
    plastic deformed     4     4     4     4
    no function     4     4     4     4
    poor  printing     5     5     5     5
    pho:
    BW QUERY: [http://space.itpub.net/attachments/2010/04/10339719_201004211645561.thumb.jpg|http://space.itpub.net/attachments/2010/04/10339719_201004211645561.thumb.jpg]
    WEBI:[http://space.itpub.net/attachments/2010/04/10339719_201004211637351.thumb.jpg|http://space.itpub.net/attachments/2010/04/10339719_201004211637351.thumb.jpg]
    QAAWS:[http://space.itpub.net/attachments/2010/04/10339719_201004211637591.thumb.jpg|http://space.itpub.net/attachments/2010/04/10339719_201004211637591.thumb.jpg]
    Why? BO can't sustain bw query : create new calculate Key Figure ?
    Who to figure out this question?
    Because I can't to do create new calculate Key Figure   in webi or Xcelsius ,So ,I create new calulate Key Figure  on BW QUERY.
    Thank you.
    BestRegards,
    Howard.
    Edited by: flying on Apr 21, 2010 10:48 AM

    HI Ingo,
        Didier Mazoue  say universe accept bw query Restricted KF and calculated KF :
       [ Restricted and calculation keyfigures| Restricted and calculation keyfigures]
       Why I create new Restricted KF and calculated KF for bw query, QAAWS,WEBI are can't return ok datas for new Restricted KF and calculated KF ?
      I create KF on Universe :
        select ued : <EXPRESSION>@Select (Key Figures\Qty)</EXPRESSION>   OR <EXPRESSION>SUM(@Select (Key Figures\Qty))</EXPRESSION>  
    parse error: Parse failed:Invalid definition(UNV0023)
       Thank you.
    Regards,
    Howard.
    Edited by: flying on Apr 23, 2010 6:00 AM

  • How to sort key figures

    Hi Gurus,
    Thanks in Advance...........
    How to sort key figures & Way to find out customers with 0 sales.
    Thanks,
    Venkat.

    Hi Rakesh,
    Thanks for your info, i assigned point to you.
    any idea on Way to find out customers with 0 sales....
    Thanks,
    Venkat.

  • How to find the basic key figure for a calculate key figure?

    Hi,
    We know one Calculated Key figure available in a query for a Info Provider. How can we find the Key figure which has been used for that CKF or from the Calculated key figure? Please help.
    Advance Thanks,

    Hi,
    1. To check the definition of the CKF you need to go to the query designer.
    2. Once into the query desiger switch on the technical names in the query. THis option is available in the Icons displayed on the top of query designer
    3. Then right click on the CKF and click display. You will find the necessary details.
    4. If you are not able to see the definition of the CKF, then you may need to go in the change mode and then . Try this in development environment.
    Regards,
    Adarsh

  • How to cumulate key figure for whole fiscal year with one time variable?

    Hello everybody!
    I have a problem creating a query that allows to get cumulated key figure for <b>whole fiscal year</b> (FY), when I actualy type <b>only last period</b> for the FY.
    The query itself is very simple:
    - I have "Organization" characteristic in "Rows" section
    - I have one key figure "Number of invoices" in "Columns"
    - I have "Fiscal year variant" 0FISCVARNT defined in "Filter" that has 12 periods within Fiscal year
    and then
    - in section "Free Characteristics" I have "Fiscal year/period" 0FISCPER.
    I want to be able to provide ONE single value when run query, which is last period of a FY (like 012/2003), but then in report see cummulated number of invoices for WHOLE fiscal year.
    Will appreciate any help!
    Vitaliy

    Please see the white paper entitled "How to... Derive a Variable value from another variable 2.x (pdf)".
    Regards,
    Troy

  • How to rearrange key figures for every row in a report

    Hi gurus,
    I need help in rearranging the key figures values( product sales for A, B, and C ) in the columns for each sales division row D1,D2,D3 displaying keyfigures in the order of descending sales volume for each division. The order of key figures has to change for each row.
    Is it possible through some user exits? Your help is appreciated.
    Thanks

    Hi,
    I am extremely sorry for my earlier post. I am not too sure about that. I heard that we can do RRI on Infoobject.
    Please look for other experts inputs. I apologise for that.
    Regards,
    Suman

  • How to work force calculation before aggregation in 2004s

    I have a calculated key figure that has a variable in the calculation entered at time of query execution.  I have tried every setting I can think of to force the calculation before aggregation with no luck.  If I create the CKF in 3.5 without a variable it will work, but I cannot get this to work in 2004s.
    Does anyone know how in 2004s to force the calculation to take place at the automic level before aggregation and indepenent of drill-downs?
    I have referred to note:922727 but none of the exception aggregation options seem to behave as 3.5 does with calculate before aggregation.

    Hi, Sudeepta
    Thanks for your reply.
    I did try to set 'No display' for 'Hour'. The result is that the Characteristics 'Hour' doesn't appear on the query result, but the detailed line of key figures still display on the result. It looks like the followings: (I put summaries on the top/right)
    Date  1/1  1/2  Overall result
    KPI1    10        11   22  (sum line)
    KPI2    20        21   41  (sum line)
    KPI1    12        13   25  (detailed line)
    KPI2    13        13   26  (detailed line)
    KPI1    11        12   23  (detailed line)
    KPI2    12        12   24  (detailed line)
    I want to suppress all the detailed lines and leave sum lines on the result.

  • Calculate key figures totals in report based in multiprovider doesn't work.

    Hi dear Friends:
    We have a requirement where the data are in 2 different cubes, the layout defined is
    selections parameters :
    Zsales_offices
    0calweek
                   Columns.
                   0calweek  KFCalc1..............................KFcalc2.....................etc.
                   In rows.
                   01.2007   Qty on demand X unit cost.    sum of all qty's prods
                   02.2007
                   03.2007
                   04.2007
    the structure in cube z1mis contain:
    Zsales_offices,product,0calweeek,unit cost.
    the Second cube structure zdemand contain:
    Zsales_office, product,0calweek,qty on demand
    Our problem is:
    1. As you can see we need keep into KFcalc1 the product from multiply Qty on demand * unit cost but when the result is displaying the result is a wrong amount and the reason is because didn't´t exist a characteristic product in the layout, without this characteristic the amount for qty on demand and unit cost are summarized and multiplying with these amounts.
    We are trying to find a solution vía restricted key figures, calculating before aggregation, but it's not woks.
    I hope that you can give one suggestion.
    Regards.
    Eg@n

    Hi,
    putting product in the rows will slove the issues as the unit cost  depends upon the  prdoduct and therefore it will uniquely identify each of the material and then it will get multiplies with the qty and therefore you will get the correct result.
    this kind of issue you will always face when you are going to multiply cost with the Qty and as the cost differ with the individual material.
    Also putting material into the rows will cause the no. of rows to increase as all the materials will show up in the individual rows for the particular month.
    Also you can make a claculated key fgure for the multiplication and use before aggregation.
    But for that your both the key figures should be in the same cube i.e. in the same rows or the before aggregation will not work you will not even get an option of before aggregation in the CKF if the key figures belong to two different cubes.
    Since your qty and cost are coming from two different cubes before aggreagtion will not work here.
    And if you do before aggregation then you report will become quite slow as it will do all the multiplication anf then will bring the result.
    So it depends on your requirement and your design how to proceed.
    Hope it helps
    Thanks

  • Currency Translation with a Calculate Key Figure

    Hi,
    Does anyone have experience with applying currency translation in BEX/Query Designer on a Calculated Key Figure? 
    I have a need for a calculated key figure to be converted to a target currency of USD (which is already defined via RRC1).  I also need the Results Row to display the summation in USD. 
    Currently, my calculated key figure displays two currencies (MYR and USD) and an incorrect summation of both currencies.
    Here is how I have defined my calculated key figure:
    NODIM ( 'Consumption (STOs)' ) * NDIV0 ( 'Material Source Plant Cost' / NODIM ( 'Source Plant Price Unit' ) )
    I am multiplying a quantity field by amount field and then dividing by a price per unit field.  I have applied NODIM on the other fields so that the amount field will retain it's properties.
    Running this query through transaction RSRT and clicking on the Generate Report button, I get the following message:
    "<b>Currency translation cannot be carried out for element 20 (my calculated key figure). Element 20 neither contains a Basic key figure nor a variable with type Amount. For this reason, you cannot and do not need to perform a currency translation</b>."
    From the above message, I must be setting my calculated key figure incorrectly. 
    Any ideas?
    Thanks!
    Hau

    Hello Ajeet and N Ganesh,
    Thank-you for your help.  I verified that the dimensions of my key figure 'Material Source Plant Cost' was of type 0AMOUNT, so that was not the issue.
    The issue was in the error message that was returned when I pressed the Generate Report button in RSRT.  Essentially, currency conversions in BEX can only be performed on basic key figures or simple replacement path variables. 
    I can perform the currency translation on a SIMPLE calculated key figure that contains only the replacement path variable (where 'Material Source Plant Cost' is an attribute of my master data characteristic ZMAT_SRC).  However, I found that I cannot perform the currency translation on COMPLEX calculated key figures, like in my example above. 
    To get around this currency translation issue and as suggested by the error message, I created a SIMPLE calculated key figure for replacement path variable 'Material Source Plant Cost' and performed the currency translation.  The problem with this solution is that while I get my currency translation, I also get a calculated key figure that is aggregated, according to the query layout.
    To get around the aggregation issue, I also created a dummy counter as a master data attribute (of ZMAT_SRC) to capture the aggregation.  I assign a value of ‘1’ to this dummy counter/master data attribute in the update rules to my ZMAT_SRC infoobject.
    I then divide my new (aggregated) calculated key figure for 'Material Source Plant Cost' by the dummy counter (which is also aggregated).  Essentially, I divided the aggregated replacement path variable by the scaling factor.  The result is that I get a new calculated key figure that has been translated into the target currency and in the correct scaling factor.  I can use the new calculated key figures in the above formula; regardless of the report is rolled-up.
    Again, thanks for your help.  It gave me the pieces to solve this puzzle.

  • How to add key figuers before chracteristic

    Hi all,
    i would like to now if it is possible to add key figuers before chracteristics in a report.
    The report look like this (CH - characteristic, KF - key figure):
    CH1 CH2 CH3 CH4 CH5 KF1 KF2 KF3 KF4 KF5
    but it should look like this:
    CH1 CH2 KF1 KF2 KF3 CH3 CH4 CH5 KF4 KF5
    How can i make it without dividing it into more reports ?
    Thx for any help,
    regards Martin Zluky

    Thx all for answers.
    We are using BW 7.x so the 3.x thing not gonna work.
    Our customer made a report template and he wants that it should look excatly as he designed it.
    Sivaraja and Reddy A, i am quite newbie in BW so i dont know what you mean. Can you please explain it little bit more.  I think that on a query level there isn´t an option to switch between KF and CH columns, or am i worng?
    We are now thinking about a macro in excel. What do you think about that?
    Regards,
    Martin
    Edited by: Martin  Zluky on Feb 1, 2010 1:23 PM
    Edited by: Martin  Zluky on Feb 1, 2010 1:25 PM

  • Key Figures and Aggregation options

    Hi All,
    There are three aggregation options:Minimum,Maximum,Sum on the Aggregation Tab when creating a Key Figure  on the Admin Work Bench. I understand that these aggregation rules are set for the Key figure BEx default settings. Does this affect at all how the data is loaded into the cube?
    Another question. If I have a Key Figure that I have set to Maximum, and would like to change to Sum.. Do I need to unload the data in the cube and load it again?
    Thanks.

    > There are three aggregation
    > options:Minimum,Maximum,Sum on the Aggregation Tab
    > when creating a Key Figure  on the Admin Work Bench.
    > I understand that these aggregation rules are set for
    > the Key figure BEx default settings. Does this affect
    > at all how the data is loaded into the cube?
    Indeed: these are report relevant settings only.
    > Another question. If I have a Key Figure that I have
    > set to Maximum, and would like to change to Sum.. Do
    > I need to unload the data in the cube and load it
    > again?
    I'm not sure about this one: Since it's a report-relevant setting only, i wonder there would be a reason why all the cubes where the KF is used should be empty...
    (you can always change the setting directly in table RSDKYF, field AGGRGEN)

Maybe you are looking for

  • Export to iTunes where is save as AIF?

    I don't get this I am trying to record a simple voice over. I have a Motu unit and a mic and I finally got the track to record in Garage Band and now I go to try to export the audio file so I can use it with my video editing program and the only opti

  • How to reduce file size

    I have one page file. There is no image, just text. Now the file size is 3MB. I cannot reduce size anyhow. I have moved the tick from embed fonts at save option tab but file size is same. How I can reduce file size? In addition this file is used so m

  • Long cable for iMac TV connection?

    I see there are cables that will connect an iMac and an external monitor or a TV. My iMac and TV are in different rooms. The cable would have to be 30' to 50', depending on how I route it. Do they make one that big? Do they make extenders? Can the ca

  • Frame around screen comes off

    Any idea how to stop the corner of the white plastic frame to come off? How can I get to the back of the frame to clamp it back in? Thank you.

  • Environment Variables (Urgent)

    Hi everyone, Does any body know how to use environment variable in any application. I am using Oracle 8.1.6 on Windows NT. And I want to use the value of an environment variable in my procedure. Any sooner help will be highly appreciated. Thanks Must