Wrong percentage calculation in Hierarchy

Dear All,
I have a hierarchy Customer Group->Customer Name->Document No. I am calculating percent of Total for top 20 customers.
Problem here is that percentage is calculated correct till the Customer Name Level but fails for document No level.
Please help.
Thanks, Franco.

Hi Franco,
According to your description, you are Crete a calculated measure to return the percentage on each hierarchy level, the problem is that percentage is calculated correct till the Customer Name Level but fails for document No level, right?
Based on my research, the issue can be caused by that there a unknown members on the document No leavel. So the total value is bigger than that on other hierarchy level. You can use exclude the unknown member to calculated percentage.
[Measures].[Sales LCY]/Sum({[DimCustLedgerEntry].[Customer].[All DimCustLedgerEntry]-[Dim].[Hierarchy].&[Unknown]
},[Measures].[Sales LCY]) ,FORMAT_STRING="PERCENT".
Reference
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0a4324af-dc41-4953-94b9-0c2f2a3d2668/mdx-custom-set-excluding-unknownmember
http://msdn.microsoft.com/en-us/library/ms170707.aspx
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • Percentage Calculation in 11g Upgrade

    upgradin to 11g issue in % cal
    The issue is as follows
    In 11g I'm calculating "ESS Rate" percenatge which is derived as below:
    ESS Rate=(ESS count/count)*100
    have casted ESS count as double and also "Count" as Int. Both the columns aggregate rule defined in the column formula is "sum"
    Edited by: 982333 on Jan 16, 2013 3:12 PM

    For more info on the columns values defined in column formula:
    ESS Rate =100*CAST(sum(CASE WHEN "Pr Audit Setup Tax Fed Fact"."Audit Oprid Nm"="- Identity".Name THEN 1 ELSE 0 END) AS double)/CAST(count(IFNULL("Pr Audit Setup Tax Fed Fact"."Audit Oprid Nm", 'NA')) AS int)
    Result obtained:
    ESS RATE| ESS Count | Count
    86.46% | 121 | 135
    while a simple calculation using calculator would clearly give you (121/135)*100= 89.63% and not 86.46%
    Can some one please help me in resolving this issue i do not see an reason for the wrong calculation of "ESS Rate" Percentage calculation.

  • Percentage calculation at Grand Total Level

    Hello,
    I have issue in calculating the percentage at grand total level. I have three measures (A count, B count and Total count). These measures are defined in rpd with aggregation rule as sum. In answers i am calculating A % as 100*A count/Total Count. I have defined the aggregation rule for this percentage column as default. I am able to get correct % results for sub total level but getting wrong percentage values when Grand Total level is added. Going through some posts in this forum, people have suggested to enable this tag in instance config file.
    <ReportAggregateEnabled>true</ReportAggregateEnabled>
    After adding this tag, i am able to get correct results. The issue is when there is no data i am able to see table view with all columns having blank values even though i have defined the no result view.
    Please Help

    HI,
    For your CKF set exception aggregation as summation based on the last most characteristic in the row in the reference(as per the example it is product)
    Regds,
    Shashank

  • Percentage calculation error?

    Hi guys,
    I must be missing something very basic - I can't get a simple percentage calculation to work in an applet:
    float percentage = 0;
    int amount,total;
    amount = 4;
    total = 10;
    percentage = (float)((amount / total) * 100);
    Instead of returning 40.0 in "percentage", this keeps returning 0.0...
    What am I doing wrong? How do you calculate a percentage in Java?
    Thanks!

    do the type casting of either of total or amount
    Gaurav

  • Percentage calculation according a result

    Hi,
    I have an issue with a percentage calculation in a query.
    As rows I have Product Hierarchy 1, Product Hierarchy 2 and Material. I would like to show the sales for each material as a percentage of the result by Product Hierarchy 2 and in another colunm the percentage according the result by Product Hierarchy 1. I have used the option "Normalized according to the next level.." and it works to calculate the percentage according Product Hierarchy 2, but how can i manage to calculate the percentage according to Product Hierarchy 1( it is not the next level of the hierarchy, it would be the second next level)?
    Thanks in advance.

    Hi ,
    check this link ..
    http://help.sap.com/saphelp_nw70/helpdata/EN/ee/37e80557494542806a38498d99a463/content.htm
    Hope this helps ...
    Regards,
    Shikha

  • Percentage calculation in reprot painter

    Friends,
    When i am doing percentage calculation in report painter ex: A/B *100, it is giving rounded value like 28% instead of 28.5 or 28.6. Any idea where i need to make changes.
    Points will be assigned
    Thanks

    Go to the Formatting-->Columns link in GRR2 screen. On the pop up screen maintain the decimal places you want.
    Regards,
    Vishal Thakur

  • Percentage calculation on query designer (7.0)

    Hi experts,
    I´m new on Query designer (7.0) and I´m trying to do a finnancial report, so for the lines I create and structure  using G/L accounts and in the columns I got the amount for each level in my structure for a month. Now I´m trying to create an Integration percentage, it specifies how high the percentage in a level is in relation to next higher level but so far I couldn't make it...
    My report must seem like this:
    Structure.............................Amount ...... Int %
    1. Assets................................1000  ....... 100%
    1.1 Current assets....................  600  .......  60%    -> (600/1000)*100
    - Cash.............................  300  ........  50%    -> (300/600)*100
    - Inventories.....................  300  ........  50%    -> (300/600)*100
    1.2 Long-term assets................ 400  .......  40%    -> (400/1000)*100
    - Property, plant and eq..... 150  .......  37.5%  -> (150/400)*100
    - Investment property......... 150  .......  37.5%  -> (150/400)*100
    - Intangible assets..............100  .......  25%    -> (100/400)*100
    I try to use each Percentage calculation options (%, %A, %CT,%GT, %RT) but it didn't work. Can anyone help me in creating a formula to get this percentage?
    Thanks

    Hi,
    check this notes and links to get an overview how to use:
    III. List Calculations (e.g.'Calculate result as..'):Interesting facts about the OLAP Processor/Analytic Engine
    SAP Note Number: [1151957|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313531393537%7d]
    If, in a structure element (key figure ID), you use the 'Calculate Results as' and 'Calculate Single Value as' properties with their additional fields at the same time, priority problems occur and the system behavior is not immediately clear.:
    Calculate Results/Single Values as ... priority rules
    SAP Note Number: [853058 |https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d383533303538%7d]
    Regards
    Andreas

  • Percentage Calculation for result rows

    Hi
    I have problem with percentage calculation on result rows. I have 2 KFs A and B, the result is calulated by setting 'calculate result rows as' to 'summation'.
    But in KF 'C' (which is calculated as A/B*100 ),
    Now the probles is the systen picks up original values of A and B for calculation of C in result rows.
    i.e. system picks up values of result rows for A and B for
    setting 'calculate result rows as' to 'nothing defined'.
    Any ideas on how to fix this.
    Thanks
    Karen

    Karen
    I found something in Forum for you
    Result Rows Calculation
    Pradip's Solution should work. Try and if it is don't forget to award points.
    Regs
    Gopi

  • Percentage calculation based on subtotal in webi 4.0

    Hi Experts ,
    How do i calculate the % column in webi 4.0  so that % would be calculated by the amount of Primary channel / Subtotal ) in one block.
    =[Amount Of promary Channel]/Sum([Amount Of promary Channel]) In Block  - not giving correct output.
    Thanks,
    Rajib

    Hi Rajib, As per my understanding, you want to show percentage on the base of subtotal.
    that means if you set break on the Compony then percentage column should contain the percentage calculated on the basis of compony subtotal.
    like this...(just one block of break)
    then just use the simple percentage function ( =percentage(amount) ), this will automatically calculate the percentage based on subtotal.
    and if you want to show 100% in subtotal row also then you can use formula= (amount/sum(amount)),
    i think we dont need to use contex operator here.
    formula for AHW total row = amount/sum(amount)
    Let me know if this will help you,
    Thanks,
    Nitin

  • Crystal report 2011 percentage calculation(Urgent)

    All,
    I am working on a report which looks like the below.
    product>>>>>>> revenue>>>>>>>>> growth percentage
    a  >>>>>>>>>>>     12 >>>>>> >>>>               48%
    b >>>>>>> >>>>>>>13 >>>>>>>>                  52%
    c  >>>>>>>>>>>>>   14 >>>>>>>>>                       
    d>>>>>>>>>>>>>>  16>>>>>>>>>>>>                                     
    total         >>>>>>>   25  >>>>>                          100%
    my requirement is to calculate the individual growth percentage of a and b with the total revenue of a and b only.
    to be more specific 12 divided by 25  and then 13 divided by 25.
    i want these growth percentages in growth percentage column in my report.
    I achieved the selective summation of revenue for a and b in the report footer but i am not able to use the total revenue 25 (that i get in the report footer)  in the body of the report(detail section) for growth percentage calculation.
    I tried using shared variables and global variables but of no use.i am not able to assign the grand total in the footer to a variable in the detail section in order to calculate the growth percentage.
    Is there any easy work around to achieve this? need urgent help.
    I also tried running totals and stuff but of no use.
    Any help would be appreciated.
    Reji.
    Edited by: reji2011 on Jan 22, 2012 7:32 PM

    Hi Reji,
    I'm not sure how you've added 'a' and 'b', however, whatever way it would be, I'm sure it would be a print time formula.
    Meaning it is calculated a later stage after all the records are printed. So, you would never be able to use a value in the Report Footer or any Footer to calculate against a detail section value and show the calculation on the detail section itself.
    The way I see it, you would need to insert this report as a sub-report, just to calculate a + b, store this value in 'shared variable' and use it for calculations in the Main Report.
    So, in the sub-report, where you have your formula that calculates the addition of a and b, just create a shared variable and assign this value to it.
    Place the sub-report on the Report Header and in the Main report create a formula that calls the shared variable. You can then use this formula/variable in Main-report's calculations.
    Hope this helps!
    -Abhilash

  • Why I can not find the percentage calculation %ct

    Hi,
    I m trying to use the Percentage Calculation %ct for a calculated KeyFigure. There are only two Functions: %  and  %A
    Can anyone explain why it is so?
    thanks and regards

    Hi,
    Percentage Variance (%)
    <Operand1> % <Operand2>
    This gives the percentage variance between operand 1 and operand 2. 
    Percentage Share (%A)
    <Operand1> %A <Operand2>
    This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * <Operand1> / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Use
    You use the following percentage functions as operators when you define a formula or a calculated key figure.
    Features
    NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, see Technical Notes About the Formula Operators.
    Percentage Variance (%)
    <Operand1> % <Operand2>
    This gives the percentage variance between operand 1 and operand 2. It is identical to:
    Formula 100 * (<Operand1> - <Operand2>) / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Plan Sales % Actual Sales specifies the percentage difference between the plan sales and the actual sales.
    Percentage Share (%A)
    <Operand1> %A <Operand2>
    This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * <Operand1> / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Character for "Division by 0" :See SAP Reference IMG  u2192 SAP Customizing Implementation Guide  u2192 SAP NetWeaver  u2192 Business Intelligence  u2192 Settings for Reporting and Analysis  u2192 General Settings for Reporting and Analysis  u2192 Display of Numeric Values in the Business Explorer.
    "Fixed costs" %A "costs" expresses the proportion of the total cost of a product that is the fixed cost.
    Percentage Share of Result (%CT)
    %CT <Operand>
    This shows how high the percentage share is, with regard to the result. The result is the outcome of aggregating the second highest results level (interim result).
    Use
    You use the following percentage functions as operators when you define a formula or a calculated key figure.
    Features
    NULL values are displayed as empty cells, not as 0. For more information about when NULL values occur and how they are displayed, see Technical Notes About the Formula Operators.
    Percentage Variance (%)
    <Operand1> % <Operand2>
    This gives the percentage variance between operand 1 and operand 2. It is identical to:
    Formula 100 * (<Operand1> - <Operand2>) / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Plan Sales % Actual Sales specifies the percentage difference between the plan sales and the actual sales.
    Percentage Share (%A)
    <Operand1> %A <Operand2>
    This gives the percentage share of operand 1 and operand 2. It is identical to formula 100 * <Operand1> / abs(<Operand2>) , if <Operand2> is not equal to 0 and the character for u201CDivision by 0u201D if <Operand2> is equal to 0.
    Character for "Division by 0" :See SAP Reference IMG  u2192 SAP Customizing Implementation Guide  u2192 SAP NetWeaver  u2192 Business Intelligence  u2192 Settings for Reporting and Analysis  u2192 General Settings for Reporting and Analysis  u2192 Display of Numeric Values in the Business Explorer.
    "Fixed costs" %A "costs" expresses the proportion of the total cost of a product that is the fixed cost.
    Percentage Share of Result (%CT)
    %CT <Operand>
    This shows how high the percentage share is, with regard to the result. The result is the outcome of aggregating the second highest results level (interim result).
    If a characteristic has been drilled down in both the rows and the columns, this reference is not unique. The system displays a warning and the relevant symbol for Data Does Not Exist. For more information, see SAP Reference IMG  u2192 SAP Customizing Implementation Guide  u2192 SAP NetWeaver  u2192 Business Intelligence  u2192 Settings for Reporting and Analysis  u2192 General Settings for Reporting and Analysis  u2192 Display of Numeric Values in the Business Explorer.
    Percentage Share of Overall Result (%GT)
    %GT <Operand>
    This shows how high the percentage share is with regard to the overall result. The overall result is the outcome of aggregating the highest results level. Dynamic filters (filters that were not specified in the Query Designer) also play a role in calculating the overall result.
    Percentage Share of Query Result (%RT)
    %RT <Operand>
    This is the same as %GT.
    Unlike the process for calculating the overall result, dynamic filters are not used in the calculation of the query result. This means that the calculation always normalizes to the same value, irrespective of the filter status and the navigational state.
    Reg
    Pra

  • Production system editing of overhead percentage calculation

    Hi,
    We want to maintain the overhead percentage calculation in the live
    production system through the T.code S_ALR_87008275.when we want to
    change the percentage the following message appers "Client has status
    not modifiable". Without changing the client status we want to change
    the percentage in the live production server. Kindly guide us in this
    regards....
    Regards
    Syamkrishnan

    Hi
    Refer to SAP notes 372620,374609,356483, 135028 and 77430
    This will help you in achieving the same.
    Good Luck
    Hari

  • Total value is wrong in main node (hierarchy)

    Dear experts,
    In the reports the value displayed for the total is wrong in the hierarchy, it is not the sum of the child nodes values:
    ex:
    If Germany has 2 company codes DE01 and DE02, and the value of no. of customers for DE01 is 500 and for DE02 is 200,
    then  it should display  like below
    Germany : 700
    DE01 :500
    DE02:200.
    But the value that is displayed in the total is worng and it is displaying a lesser value than the actual sum,
    like in the above example
    Germany: 690
    DE01:500
    DE02: 200
    I have checked the key figure which calculates the value, it is correct, only issue is with the value displayed for the whole(parent node)
    please help me on this...
    Thanks in advance..
    Regards,
    Kalpana

    Hi.
    So no funny business going on with calculations in the key figure? Ok... Then I would want to know if it's happening for more than one user, more than one report and especially if it's happening for other hierarchies also.
    At any rate, run it in RSRT with execute and debug. Run with/without aggregates. Check results.
    I have come across the same symptoms twice and both times it was due to a problem with "corrupted" aggregates, so the node value would come from the agg (and be wrong for some tech reason that was fixed by the basis guys) and the single values would come from the cube.... Some explanation like that was given then, so if you got aggregates, get your basis guys to check them or simply dump them and recreate.
    If you dont have aggregates, then check if the hierarchy is ok. Maybe an attribute change run got messed up and didn't activate the hierarchy properly (I know, that should not happen and it will use the old active version, but anyway, just to check...).
    Regards
    Jacob

  • Calculation in Hierarchy

    Hi,
    I have a DSO, the structure is following,
    Z_Org, Z_RN,  Z_Value, Z_counter
    'Z_Org' & 'Z_RN' are the keys of the DSO.
    The data in DSO is following,
    Org1-1      1          300           1
    Org1-1      2          300           1
    Org1-1      3          300           1
    Org1-2      1          700           1
    Org1-2      2          700           1
    There is a hierarchy for 'Z_Org',
    Org1
            Org1-1
            Org1-2
    Now, I want to make a query with result as following,
    Org1                        1000          .....( 300 + 300 + 300 + 700 + 700 ) / ( 1 + 1 + 1 + 1 + 1 ) = 460 (Wrong)
            Org1-1             300            .....( 300 + 300 + 300 ) / ( 1 + 1 + 1 ) = 300
            Org1-2             700            .....( 700 + 700 ) / ( 1 + 1 ) = 700
    The problem is the value in the report has to be a calculated Key figures, The value for 'Org1' is calculated too.
    But the result I want to see is 1000 which is following the Hierarchy summarizing rule. Just simple 300 + 700.
    Please tell me how I can make this Query.
    For the business reason, the 'Z_RN' has to be in the DSO.
    Thank you very much.
    Seven

    Hi,
    Create a keyfigure KF2 and have any dummy keyfigure with in it. Go to the properties of the keyfigure and choose the dispaly as properties of the keyfigure as unique count on Z_RN.
    Create another keyfigure KF1 = Z_VALUE/ KF2 which will give
    Org1-1 300
    Org1-2 700
    Org1 - 1000
    This is posstible in BW 3.5 also we tried this for most of infoset queries when the values got doubled or tripled based on keyfields used over there.
    Hope this helps for you.
    Thanks,
    Arun

  • Percentage Calculation in Query

    Hi Gurus,
      Hope you are all doing good! I have an issue in my query. I have calculated the summation of Profit for 05 and 06 . In the properties these are the specification i have given :
    1.Scaling Factor : 1,000,000
    2.Number of Decimal Place : 0.0
    3.Calculate Result As : Summation
        I get the summation for both 05 and 06 correctly. I computed the percentage for
    both and seems to be fine.
    Formula used for computing percentage : ' / Profit 06' / ' / Profit 05' * 100
    My issue being the Over all percentage seems to be high.
    Any idea Gurus?
    Points would be surely assigned.
    Regards,
    Sunitha.R

    Hi Norris Silva,
    As per your scenario total questions = 11
    persons (c1, c2, c3, c4, c5) = 5
    c1 answered questions = 5
    c2  "          "      = 5
    c3  "          "      = 1
    here to calculate the percentage of answered questions
    for each person. This can be calculated as below with use of
    calculated key figure
    c1's % ---> ci1 answered questions/total questions * 100
             5/(551)*100= 45.45%
    like write formula in calculated key figure for each person.
    Hope it helps you...
    Regards,
    Ramki.

Maybe you are looking for

  • Multi Lingual String not getting displayed properly with Java 1.5.4

    Hi, I have a strange problem and i think the problem is due to java 1.5.4. Problem is: My application was previously deployed on weblogic6.1 server and jdk used was 1.3.1 After i migrated my application to weblogic 9.2 and started using jdk 1.5.4, i

  • How to sub-total in alv?

    Hi, I have an alv layout like following: ZZZ 300100089 1050 ZZZ 300100089 1050 subtoal             2100 90256243 300100000 193410 90256242 300100000 173250 90256241 300100000 173250 90256240 300100000 173250 90256239 300100000 173250 90256238 3001000

  • Can't import P2 Footage after 5.1.2 update

    This one has me stumped. After updating to 5.1.2 I can not import P2 footage. When I click on the import Panasonic P2 tab under the import menu, nothing happens. Then, I click on it one more time and the import window loads but there is nothing there

  • IDOC extension (segment cannot be identified)

    Hi all, I have IDOC DEBMAS configured, but when I trigger 1 customer from BD12, the IDOC is failing with status 26 error segment cannot be identified. In WE82, we have the following: DEBMAS     DEBMAS06                     470 DEBMAS     DEBMAS06    

  • Use of NOSCL(Counter for scheduling lines) in 02LIS_02_SCL

    Hi, I want to extract PO value from 02LIS_02_SCL in BW. The value which I get in PSA table is +ve and -ve. I am boserving the sum value for any PO is zero. I wanted to know what is the use of NOSCL(Counter for scheduling lines) in 02LIS_02_SCL? I can