Percentage with calculated Key figure in queru designer

Hi,
I have this problem with query designer.
I want to calculate a share over sub total in a query with 3 characteristic exploded: one in vertical (project)
and 2 in horizzontal (quarter and year). I am using query designer 7.0.
I have created a calculated KF with function CT% but, instead to have the percentege over subtotal, I have the percentege over total.
This is the example of what I would like to get:
                    quarter  1                                               2
                        year  2007                 2008                 2007                  2008
                                Cost   % cost    Cost   % cost    Cost   % cost     Cost   % cost
Project
Total                        27365    100%      30155   100%   29300   100%   29875   100%
PRJ 1                        820      2,99%     1100     3,65%   930     3.17%   860     2,88%
Could anyone help me ?
Thank you !
Bye.
Elena

Hi,
create two restricted keyfigs:
KF1 restricted to one of your 0CALYEAR
KF2 restricted to the other year
Create a formula or CKF, KF3 = KF1 - KF2
Implement your TOP N condition on KF3
hope this helps...
Olivier.

Similar Messages

  • Creating Query in Production with Calculated key figures

    Hi BW Experts,
    Can u pls let me know that in case of Production System when we are allowing users to create reports with Adhoc Web Query Designer and using CKF + RKF
    (Calculated key Figure) which is already transported to Production in a specific Package, Is Production system will allow to save report?
    Pls sugges how to solve this problem ..to give permission for users to create reports in production server with CKF RKF?
    Thanks in advance

    rsa1 -> transport conection -> object changeability button -> Set query elements as everything changeable.
    If you want to refine this you have to do by authorizations.

  • Problems with Calculated Key Figure in Bex

    One of our super users have copied a query and trying to do some changes in the new query. In the Query designer, the person was directly dragging a Calculated Key Figure from the left hand side panel into columns and trying to change its properties (Currency conversion key is changed from 'Nothing Defined' to 'Monthly average rate' with variable entry.
    Then we get the error 'Abort system error in program and form SET_TCUR-02-' without even getting the variable popup window.
    Also when we check the Query properties, we observed that one variable entry (which is displayed in the target currency field in the properties) is displayed twice and came to know that this is the reason for the error.
    But why is that displaying twice there? Is there anything wrong in the way we had created the CKF? Do you have any document on how to use CKFs and RKFs?

    Check here:
    http://help.sap.com/saphelp_nw04/helpdata/EN/13/e072abaddb574284d22361f0b824bf/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/6f/56853c08c7aa11e10000000a11405a/content.htm
    For Currency Translation "How to:, see here:
    http://help.sap.com/saphelp_nw04/helpdata/EN/d2/02223c5f00612be10000000a11402f/content.htm
    Thanks..
    Shambhu

  • Problem saving queries with calculated key figures

    Hello Experts,
    I am analyzing this problem since many hours during the last weeks and I don't know, what else to do.
    The problem is saving a key user query containing a calculated key figure in the production system (BW 3.5 SP SAPKW35015). The Error 'The query could not be saved due to a problem in transport' occures.
    If I exclude the KF from the query, saving is possible, so the calculated KF must be the source of the problem.
    The system is set to not changeable, but the 'Object Changeability' of 'Query Elements' in 'RSA1' --> 'Transport Connection' is set to 'Changeable Original'. If I set this option to 'Everything changeable', saving of the query works, but this is not possible in production, because transported standard queries would also be changeable.
    For saving queries, die authorization object S_RS_COMP and S_RS_COMP1 is included completely with *, but this does not help.
    I also transported the query and the KF again from development system ... no change, same problem.
    I found the SAP note 533413, but what does this mean? "This problem can only be solved in the next BW release ..." I heard from colleagues, that BW 7.0 has the same problems.
    Does anyone have an idea, how to solve this problem?
    I would be very thankful for any reply...
    Hannes
    Edited by: Hannes Heidrich on Jun 23, 2008 12:07 PM

    Thank you for your answer, but I have set the Object Changeability to Everything Changeable and restricted the user with S_RS_COMP. So only certain query names can be used and changed. Experiences from collegues said, that deleting and transporting again would not help.
    Best Regards,
    Hannes

  • Using Explorer with Calculated Key Figures from BEx (BW 7.31 / BI 4.1)

    I'm looking for suggestions on how to leverage data from calculated and restricted key figures in BEx (from a BW 7.31 system) with Business Objects Explorer (from a BI 4.1 system).  Our current process involves some complicated workarounds and with the implementation of BI 4.1 and I'm hoping to streamline things a bit.
    Here is what I had in mind...
    An information space (indexed daily) sitting on a universe (hopefully UNX) that referred to a BEx query on a multiprovider in BW.  My understanding was that universes would be able to consume BEx queries (including their restricted and calculated key figures) in 4.1.  Based on a recent post (http://scn.sap.com/thread/3417905), it appears that the feature that I was hoping for may have not made it into the GA release.  Obviously, I could move the calculations and restrictions into BW ETL or maybe into the universe, but since that work has already been done and lives in the queries, I'm hoping to use them!  Also, we could use a different tool such as WebI, but at this point the user base is comfortable with Explorer and we would like to continue to use it.
    Suggestions? 
    Thanks!
    -S

    Hi McDowell,
    Regarding to the BEx connection in Explorer, SAP provide two solution
    1. BWA connection
    2. Unv on top of connection
    For the UNV situation, you could use the calculated / restricted key figure in the system but please assgin the aggregation level for them (Database delegate is not supported if I am not wrong)
    Also plese consider two points
    1. Data size (UNV cannot support large data size)
    2. Scheduling (Explorer does not support event trigger? correct me if I am wrong)
    Best regards
    Alex yang

  • Calculated Key Figures in Query Designer - translation

    Hello Experts,
    I created  a few Caclulated Key Figure in the Query Designer. They have a GUID and a text description.
    I would like to know:
    1) How these CKF are represented in ABAP on the system and where I can find them - some database table  ?
    2) If I want the description to be available in many languages how can I handle this ?
    Thanks a lot
    Rado

    Check this
    Tables analysed by analyze_rsz_tables
    Khaja

  • Problem with Calculated Key Figure and Acumulated

    Dear Masters,
    I am trying to use cumulated KF in a query. No problem with results. I just flag 'Cumulated'. However I need to use the value of each line in an operation. Let me illustrate it:
    Cumulated KF    KF1      FINALKF
    2                         2             2/2=1
    3 (2+1)                1              1/1=1
    5 (3+2)                 4             4/2=2
    6 (5+1)                 2             2/5=0.4
    As you can see above instead divide the KF1 by Cumulated value of a Line, the final result is always KF1/the value that would be the add value. The first line always is right because for the line 1 cumulated value has no accumulation value.
    Any idea?
    Regards,
    GilsonTeixeira

    Any idea?

  • Calculated Key Figures based on Attributes

    Hi
    In one of our queries we need to create a calculated key figure based on an attribute. Any suggestions on the best way to do this?
    I have looked at a Virtual Key Figure, but because our Cube name contains underscores (_) it shortdumps. Is there a way around this?
    Thanks in advance.
    Chami Herath

    Hi,
    what do you mean with calculated key figure based on an attribute? Is your attribute a characteristic in the cube or is it just a attribute of a characteristic? Let me know more details.
    regards
    Siggi

  • Calculated key figure

    Hi All,
    I am having a problem with calculated key figure. The RKF is restricted by fiscal year period and amount characteristics. The FYR is further restricted by hard coded value less than and equal to 2007-11. This RKF is called Jan and similarly we have 11 more RKF's with respective months name on it.
    The objective of this query is to carry forward the balance of each month into next month, now the problem is that it doesn't show the correct balance for following month correctly for one company code. I have checked all the data is loaded for the company code. If I restrict my query by just company code in question it gives me the correct figure.
    Can any one identify any obvious reason for this?
    Regards
    SS

    Hi Arun,
    The report works ok, if I restrict it by company code in Query but doesn't work if I dont restrict by company code. There is no user enrty variable for company code.
    regards
    SS

  • Calculated key figures with incorrect values

    Hi experts,
    i have a requirement whre i have multiple calculated key figures based on different restricted key figures.
    say for eg:
    RKF1-restricted to calmonth 01.2006
    RKF2-restricted to calmoth 01.2007
    ckf1-RKF1 %a RKF2
    RKF3-restricted to calmonth 02.2006
    RKF4-restricted to calmoth 02.2007
    ckf2-RKF3 %a RKF4
    and so on...
    In my output of the report, ALL CKFs are show same result as CKF1!!
    please suggest..
    thank you all in advance

    Hi,
    Indeed my cube is a copy of 0IC_C03.
    Could you please explain more about the filtering.
    I have the following key figures
    0TOTALSTCK
    0ISSTOTSTCK
    0RECTOTSTCK
    ZISSSTCK_VALUE
    ZREC_VALUE
    ZTOTSTKVALUE
    ZTOTSTKVALUE is CKF with inflow and outflow of ZISSSTCK_VALUE
    ZREC_VALUE
    Whenever there is 0 it displays NO CALC possible. I would like to have it blank or 0s.
    thanks

  • How to use Restricted or Calculated Key figure with Characteristics?

    Hi,
    Query has characteristics 'Indicator' which has values  'X' and 'Y' depending this value, the Key figure Quantity(which is always +ve) has to be shown on the report either as -ve or +ve.
    Do I use Restricted Key figure if so, how? Or can I manage with a Calculated Key figure?
    Thanks,
    Kamala

    Hi Kamala,
    You can create 2 RFKs each in which you are restricting the KF with char value X and Y. For the one that needs to be -ve, create a CKF with this RKF and multiply it by -1 in the formula. Then you can create a new CKF that will add this CKF and the other RKF.
    Hope this helps...

  • How to calculate percentage based on key figure maximum value

    Hello everybody!
    I need your expertise on a query 'issue' I'm facing. Let's say I have a query getting me the Number of Open Items per Week (starting from billing document's Issue Date).
    My client wants to be able to see the percentage per week and not the actual number.
    So, what I have is below:
    <b>Wk</b><b>"OI Nr"</b>
    1                                "68.801"
    2                                "66.288"
    3                                "59.344"
    4                                "50.506"
    5                                "20.950"
    And what I want is below (in italics):
    <b>Wk</b><b><i>"OI %"</i></b>
    1                       "<i>100%   </i>"           (i.e. 68.801 / 68.801 * 100)
    2                      "<i> 96,34%  </i>"         (i.e. 66.288 / 68.801 * 100)
    3                      "<i> 86,25%  </i>"         (i.e. 59.344 / 68.801 * 100)
    4                       ......
    5                       ......
    Is it possible to achieve sth like this by altering some key figure properties or in any other way?
    Thanks in advance.

    First u need to create a calculated Key Fig globally. You can do this at the extreme left end of the query Designer. Just right click on the Calculated key Fig and say <b>New Calculated Key Figure</b>
    Give the description of the Key Fig and in the formula section just put the the key fig . <b>'OI Nr'</b> in you case
    When u say ok it will open the properties of the key fig there u can see <b>Enhance>></b> at the bottom. Click on that make the <b>exception aggregation</b> to <b>maximum</b> and <b>refernce characteristic</b> for the one which u are having the values 68.801, 66.288, 59.344, ..
    Save this calculated key fig
    now in the Columns create a <b>new selection</b> under the key fig.
    drag the newly created calculated key fig in this <b>new selection</b> and say ok.
    Now right click on this <b>new selection</b>, go to the <b>Calculated Single Value</b> as drop down and make it <b>Normalize-Sub Totals</b>
    Tick the checkbox  <b>Also Apply to result</b>
    and select <b>Calculate Along Columns</b>.
    Save the query and execute. This should solve youe issue
    Hope this helps.

  • Problem with a key figure restriction

    Hi,
    I have a problem with one key figure in report: in infocube, this key figure is aggrigated for all the profit centers (summation). In infocube, there is a value '150' for each profit centers (100 pieces) and in the report it is counting 150*100=15000. However, it shouldn't count the sum of all entries in the infocube but show only one value in the report which would be '150'.
    I think this should be possible to do but I just don't know how. Hope somebody is able to help me. Thanks in advance.

    Hi,
    If the values are same for all profit center then change the Profit center infoobject property in the query design to show the maximum values for the 'calculation result as' parameter
    Regards,
    Vishwa,
    Edited by: Vishwanath H.E on Sep 3, 2008 9:19 AM

  • Calculated Key figure Complicated

    Experts,
    I am struggling with the design of a report which requires the following fields
    Payer      ShipTo     PH2     Year     Units     Price     Sales $     Price input
    HD     1234     1301     2006     16      $19.00       $304.00       $19.00
    Lowes     9999     1301     2006     100      $19.60       $1,960.00       $19.60
    Lowes     9999     1303     2006     300      $29.00       $8,700.00       $29.00
    HD     1234     1303     2006     200      $32.00       $6,400.00       $32.00
    Above is what is directely coming for the cube. I need to calculate "Base Price" which is the average of "sales" by PH2. for example the report will like like following
    Payer      ShipTo     PH2     Year     Units     Price     Sales $     Price input     Base_Price     
    HD     1234     1301     2006     16      $19.00       $304.00       $19.00      1132     Sales Avg by PH2
    Lowes     9999     1301     2006     100      $19.60       $1,960.00       $19.60      1132     Sales Avg by PH2
    Lowes     9999     1303     2006     300      $29.00       $8,700.00       $29.00      7550     Sales Avg by PH2
    HD     1234     1303     2006     200      $32.00       $6,400.00       $32.00      7550     Sales Avg by PH2
    Any thoughts on how I can do this...
    Help will be greatly appreciated
    Thanks
    Raj

    Hi Yashu,
    Create Calculated Key figure on sales, and select properties od that CKF and on Exception aggregation select Average of all values <> 0, and exception chareteristcis as PH2.
    hope this helps
    Regards,
    Daya Sagar

  • ELSEIF in calculated key figure

    Dear gurus
    We have recently upgraded to NW2004s, and would need some help on the formula for my calculated key figure. This calculated key figure is meant to replicate IF... ELSEIF statement, depending on what the user enters. The logic that we have are as below :
    IF Var=1, then display key figure A
    ELSEIF Var=2, then display key figure B
    ELSEIF Var=3, then display key figure C
    ELSEIF Var=4, then display key figure D
    where Var is a Formula Variable, Processing By User Entry/Default value.
    The formula that we have originally, in BW3.5 is :
    <i>(Var == 1) * 'Amount in TC' + (Var== 2) * 'Amount in Comp Code' + (Var == 3) * 'Amount in Parall USD' + (Var == 4) * 'Amount in Hard Cur' </i>
    This formula has served us well in BW 3.1 to BW 3.5, and never had any problems with it. However, when we migrated over to BW 7.0, we could not get values for this formula (eventhough we have data in our cubes). The only data that get is when we key in Var=1, but when we try with Var=2, 3 or 4, no data is displayed in our key figure.
    We tried to debug, but somehow we could not figure out how the new BW7.0 calculates these type of key figures, and whether is there a change in the formula variable. We believe that the problem may lie in the way that BW 7.0 interprets the formula above, and only obtains the first portion of the formula (Var==1).
    We would appreciate any helps, and of course, points will be awarded if problem can be solved.
    Thanks a lot

    Dear all
    With some luck in searching, I manage to find an OSS note which depicts this error and resolve it. For those who have the same problem, please use this OSS Note 994194.
    Cheers

Maybe you are looking for

  • Deleted podcasts in Finder, still show up in iTunes, how to remove?

    Well, I rummaged a bit in the old threads and found some stuff... but I'm looking for a simple solution. I'd like to delete from iTunes all the podcasts that I had deleted via the Finder. I can figure out which ones if I laboriously, manually, click

  • Clicking Noise from New U410

    Bought a brand new U410 two weeks ago. Nice computer, but I notice a clicking noise which I assume is originating from the hard drive every so often. It's very low, but noticeable. Tried a few apps to quiet the drive but none worked. Downloaded a cou

  • Creating mysql schema from pojo with hibernate using netbeans

    I have been fortunate in finding some good tutorials on how to create POJOs from database schema using hibernate (e.g. http://netbeans.org/kb/docs/web/hibernate-webapp.html). Does anyone know of tutorials on creating database schemas from POJOs -- pr

  • QM activation for a plant

    Hello gurus and friends, can anybody tell me how to activate QM for a plant for results recording. how to ensure that result recording does not stop any further process, ie, material should be posted to unrestricted stock instead of quality stock. Pl

  • Service Procurement in EBP

    Hi, In extended classic scenario SRM 4.0 / R/3 ECC5.0 for Service Procurement :- 1.I have replicated Services from R/3 backend and Service Product Cat is also maintained in all place in IMG and as well in Org plan. But when user is creating shopping