Calculating percentages

I have a row of numbers with at the end a total of those numbers.
I need to create a row with each number as a percentage of the total number.
I use the formula =(A1/S1)*100 what gives me the right percentage for the first one, but what do I have to enter that the next column stays on S1 and not goes to S2, what isn't there .
Thanks , Pila

pila1 wrote:
I have a row of numbers with at the end a total of those numbers.
I need to create a row with each number as a percentage of the total number.
I use the formula =(A1/S1)*100 what gives me the right percentage for the first one, but what do I have to enter that the next column stays on S1 and not goes to S2, what isn't there .
I don't understand.
are you filling a column or a row ?
If you are filling a row S1 would not become S2 but T1
My guess is that you need to learn the behaviour of absolute references::
$S1
S$1
$S$1
Yvan KOENIG (from FRANCE mercredi 6 février 2008 22:22:37)

Similar Messages

  • Calculated Percentage Columns in Pivot Table loose formating in Excel

    I have a simple report built using pivot table ( OBIEE 11.1.1.5.0)
    1 Metric and 1 dimension using pivot table. and I duplicated the metric column and change it to % column.(Show data as % of column). SO far so good. Below is the snapshot
    http://tinypic.com/r/2s14xa9/7
    Now i download the report in excel and all the % values are messed up . Below is how it looks
    http://tinypic.com/r/bede90/7
    I tried messing with data formats etc..nothing works.. I cannot add a custom column format to the metric column since it will impact the derived % column.
    Is this a bug ?Any pointers ..
    Thanks

    Hi,
    Follow up this SR:
    SR 3-5060435331: Calculated Percentage Columns in Pivot Table loose formating in Excel
    Workaround: (not sure may be give a try)
    also give a try like below one then try to download it may work.
    In that % column -->add the below statement in the Custom CSS section of the column properties:
    mso-number-format:"\@"
    Refer snapshot here:
    http://i53.tinypic.com/a09kqv.jpg
    This will treat the data in the column as text while downloading to excel, hence retaining any leading or trailing spaces.
    Thanks
    Deva

  • How can I display a letter grade in my gridview after calculating percentage into a hidden field in Visual Studio?

    For school I am working on an app using C# in visual studio that allows a student to enter their name, the number of points they earned and the points possible. When they click a submit button, the grade percentage is calculated in a hidden field and then
    the percentage and letter grade should spit out into the gridview. THe issue I am having is trying to figure out how to translate within the if statements regarding the percentage amount equalling whatever letter grade, and then spit that letter grade out
    into the gridview. Here is the code I have so far:
            protected void btnSubmit_Click(object sender, EventArgs e)
                SqlStudent.Insert();
                hdnGradePercent.Value = (((int.Parse("txtPointsEarned.Text")) / (int.Parse("txt.PointsPoss.Text")) * 100)).ToString();
                if ((int.Parse(hdnGradePercent.Value) >= 0) & ((int.Parse(hdnGradePercent.Value) <= 59)))
    (this is where I am having trouble. I can't figure out how to get the letter grade and percent to spit out into the   gridview.)
                else if ((int.Parse(hdnGradePercent.Value) >= 60) & ((int.Parse(hdnGradePercent.Value) <= 69)))
                else if ((int.Parse(hdnGradePercent.Value) >= 70) & ((int.Parse(hdnGradePercent.Value) <= 79)))
                else if ((int.Parse(hdnGradePercent.Value) >= 80) & ((int.Parse(hdnGradePercent.Value) <= 89)))
                else if ((int.Parse(hdnGradePercent.Value) >= 90) & ((int.Parse(hdnGradePercent.Value) <= 100)))
    Any help would be greatly appreciated! I've been stuck on this for hours and I"m losing my mind!!

    Please post ASP.NET questions in the ASP.NET forums (http://forums.asp.net ).

  • HANA, Aggregations and calculating percentages

    I have a table containing user-role assignments, e.g. the table contains tuples of the form (userA, roleA), (userA, roleB). Now, I would like to get an overview on how the distribution of users across roles. I would like to get the following overview.
    role
    COUNT DISTINCT user
    percentage
    roleA
    5
    5/15 * 100 = 33,3 %
    roleB
    8
    53,3 %
    roleC
    10
    66,6 %
    Total
    15
    Using SAP HANA Studio, I created a Calculated View and count the number of distinct users with a counter. However, how to compute the totals (note that this is not the sum of distinct users per role) and how to compute then the percentages?
    Thanks!

    OK, totals are now computed by modeling the following two aggregations:
    1. count distinct users per role
    2. count distinct users in the table
    Then the two aggregations are joined.
    A new problem pops-up: I divide the two different counts in a calculated column or calculated attribute. Whatever I try, the result of dividing two integers is 0. What should I do?

  • OBIEE 11G - problem with calculating percentage

    Hi,
    I have a problem with calculating a percentage....
    I have a 2 measures Success and Failure
    where Success is a count(Response_key)
    Failure is a count(failure_key)
    I want Success/(Success+Failure) * 100
    I am getting this value as a 0
    Infact any column I take from the subject area and say count of that column and divide it by any integer say count(column1)/5 ,Say count of that column1 is 132 Eg: 132/5 , Its showing this value as 26.00 when I put decimal value to 2 , but it is 26.4...It is avoiding decimal values .
    So in my case success/(success+failure) in which Dr is greater than Nr . Since we get the value as 0.something . It is showing 0 value
    So , 0*100 it is showing me as 0%
    Can anyone please help me on this ??
    --Siri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Yes, you need to put cast in numerator alone to get the resultant output in double.
    You can mark the post as Correct since your issue is resolved now.
    Thanks

  • Calculating percentages by date grouping in a Cross-tab report.

    I have created a monthly at glance dashboard, and I am having difficulty with the percentage breakdown.  I have the report grouped by date, and sorted by month with YTD total on the right.
    *The problem is all the rows with a percentage are calculating the same across the columns.  The YTD total is correct, but the totals for January and February are not 60%. 
    If I run the report for one month everything aligns, and in multiple months everything is correct with count summaries.
    Please let me know if anyone has any advice.

    Please see the crosstab expert window view requested below.
    Also, here is another screenshot of the crosstab in preview.  You will see that all sums with whole numbers are calculating and pulling correctly by month.  The sums with percentages are defaulting to the YTD across the row.  Thank you very much for your assistance.
    Joshua

  • Calculating percentages using numbers

    Hi there, 
    I hope someone out there can help me but how do I calculate the percentage of two numbers using Numbers. For example £4000 incoming and £1650 outgoings - How do  I get the spreadsheet to work out the percentage and input this number into the fields?  This is really painful trying to work it out. Thanks

    Hi Adrian,
    You wrote: "I need to do this with 2 column actually A and B, both column need to be added by that 5%, I think this only possible"
    If I'm reading the description of your table correctly, column A shows the number of units, column B the price of each unit, and column C the price of that quantity of units.
    If you increase the unit price by 5%, that will also increase the total price of n units by 5%, provided you multiply the quantity by the new unit price instead of the old unit price.
    Here's a step by step:
    Original table:
    Formula in C2, and filled down column C: =A*B
    Add a new column (D) to hold the formula for the increased price.
    D2, and filled down: =B*(1+5%)
    With the cells shown still selected, Copy (command-C)
    Now select cell B2, and go Edit > Paste Values (Numbers '09) or Edit > Paste Formula Results (Numbers 3)
    Results should be as shown below:
    (Note that column C has been recalculated to show the results of a 5% increase in unit prices. Column D (labelled "temp") has also been recalculated to show what the unit prices would be after a second 5% increase. the last step is to delete this column, leaving us with the original table, but with unit prices increased by 5%:
    In practice, you would probably NOT do this on the actual invoice. Item names (or numbers) and the unit prices of those items would be kept on a price list, separate from the invoice, and the price would be looked up by the Invoice table when the item name or number was entered. The table would be used as an invoice generator, and the completed invoices either printed or 'printed' as pdf files as each was generated.
    Price changes would be made on the price list, either individually, or geerally as done here. Note that the new prices would affect new invoices AND any existing invoices still connected to the price list (which is why each is 'printed' to separate it from the calculating document). Here's a simple example using a price list as a lookup table. Item Number and Quantity are entered on the invoice. The rest is added by formulas.
    Formulas:
    Price List has no formulas.
    Invoice:
    C2 and filled right to column D and down to row 6:
    =IFERROR(VLOOKUP($B,Price List :: $A:$C,COLUMN()-1),"")
    In row 6, the empty cell in column A will cause a "could not find" error. IFERROR catches this and places a null string in C6 (and in D6).
    E2 and filled down to E6: =IF(LEN(D)<1,"",A*D)
    LEN(D) returns the length (in number of characters) of the contents of the cell on the same row of column D. If the cell is empty, or contains a null string (as in row 6), the length is zero, and IF will place a null string in column E.
    SUM, in row seven, interprets text (including a null string) as zero, so this does not affect the sums in coumns A and E.
    Row 7 is a Footer Row. Formulas referencing a whole column ignore values in Header and Footer rows, making it possible to place the formulas below where they are.
    A7: =SUM(A)
    E7: =SUM(E)
    Regards,
    Barry

  • Need an option to populate the calculated percentage during run time

    Hi All,
    I have a requirement in reporting , My report out put contains two key figures based on condition it will populate exceptions (green, yellow, Red) .Now i want calcuate Miss percantage (Marked in Red color in expection)
    This Miss percentage to be calculated as per below logic during run time , percentage should populate in out put.
    total no of records in report out put / Miss records (which marked red color in out put)*100
    Regards
    Murali.K

    Hi Murali,
    You need to create three CKF.
    For calculating Red color count, create a CKF and use the Alert level condition which you have used in Exception.
    For Example if your Alert level for red is Value LT 20.
    then "Missed Record CKF" will have ( VALUE < 20) boolean calculation. Hope you aware about it.
    after that create another "Total record CKF" which calculate the number of records by simply keeping 1.
    Then under the third CKF used, SUMGT(Missed Record) / SUMGT(Total Record) * 100.
    Regards,
    Ashish

  • Short dump on calculating percentage

    hi experts,
       i'm trying to calculate for the total salary based on the reference value.
    but when i'm retrieving the PTOT(totalsalary) for calculation ,i got into short dump CONVT_NO_NUMBER or CX_SY_CONVERSION_NO_NUMBER.
    It's unable to interpret "PTOT(ASSUME  '134,475.81')" as a number.
    HERE i've given my logic what i used.
    if anyone knows plz help me.
    Table for collection of data. Used in hr_basic_display_list.
    DATA: BEGIN OF DATA_TAB OCCURS 20,
            PERNR(8), WGTYP(10), WTEXT LIKE T512T-LGTXT,
            APR(12), MAY(12), JUN(12), JUL(12),AUG(12), SEP(12),
            OCT(12), NOV(12), DEC(12),JAN(12), FEB(12), MAR(12), ptot(15),
            LANGTEXT1(60), LANGTEXT2(60), LANGTEXT3(60), LANGTEXT4(60),
            SORTEXT(250),
    END OF DATA_TAB.
    DATA:BEGIN OF ITAB_PER OCCURS 0,
         PERCENT(15),         “The field to be added in the output ALV screen                                                                                END OF ITAB_PER.              to calulate percentage                     
    .”enhanced fields in            .                                              selection screen of report HINCANN0
    PARAMETERS : P_PERCEN(15) , “the reference field
      LOOP AT DATA_TAB.                                       "changes
    ITAB_PER-PERCENT = ( DATA_TAB-PTOT / P_PERCEN ) * 100.
        APPEND ITAB_PER.
        CLEAR ITAB_PER.
        ENDLOOP.

    Hi Siva
    Change the type of PERCENT to dec instead of Char.
    ~BiSu

  • Calculating Percentages of expressions in a matrix

    I am having difficulty calculating the percent change in an SSRS 2008 report using a matrix and groupings
    I am getting errors NaN or infinity or the incorrect %.
    Goup 1
    Group 2
    Actual
    Budget
     Variance
    Percent Change
    Actual
    Budget
     Variance
    Percent Change
    Type 1
    1.55
    1.64
    -0.09
    (5.24%)
    1.42
    1.53
    (0.1043)
    (6.84%)
    Type 2
    8.11
    7.36
    0.76
    10.29%
    0.00
    0.00
    0.0000
    0.00%
    Type 3
    0.95
    0.98
    -0.02
    (2.33%)
    0.58
    0.71
    (0.1353)
    (19.00%)
    Type 4
    2.15
    2.01
    0.14
    7.13%
    1.22
    1.20
    0.0238
    1.99%
    Type 5
    2.15
    2.12
    0.03
    1.47%
    0.96
    0.92
    0.0328
    3.55%
    Type 6
    2.27
    2.12
    0.15
    7.32%
    0.90
    0.73
    0.1763
    24.21%
    Type 7
    1.69
    1.41
    0.28
    19.98%
    0.83
    0.78
    0.0532
    6.85%
    Type 8
    2.70
    2.65
    0.05
    1.90%
    0.97
    1.01
    (0.0401)
    (3.98%)
    Grouped by Type
    The fields are expressions as follows: 
    Actual:  =IIF(Sum(Fields!ActualDRGWeight.Value)>0,Sum(Fields!ActualDRGWeight.Value) /sum(Fields!Current_Actual.Value),0)
    Budget: =IIF(Sum(Fields!BudetDRGWeight.Value)>0,Sum(Fields!BudetDRGWeight.Value) / Sum(Fields!Current_Budget.Value),0)
    Variance: =(sum(Fields!ActualDRGWeight.Value)/sum(Fields!Current_Actual.Value))-(sum(Fields!BudetDRGWeight.Value)/sum(Fields!Current_Budget.Value))

    Hi ,
    It might be because of two reasons :
    i)make sure all the Fields involved in calculation are of compatible data type
    ii)IIF - Divide by  zero error -
    http://www.allaboutmssql.com/2013/09/ssrs-divide-by-zero-error-myth-of-iif.html
    Suppressing Null or Zero Values at Run Time
    http://stackoverflow.com/questions/5471817/ssrs-2008-dealing-with-division-by-zero-scenarios
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • REP-1401 error occurs when calculating percentage

    Hi all,
    I have a formula column with formula like this:
    function percent1Formula return Number is
    v_percent number;
    begin
    v_percent := (:qty1 - :qty2) / :qty2 * 100;
    return(v_percent);
    end;
    It gives me REP-1401 Fatal PL/SQL/ error.
    Does anyone know how to write percentage formula in report builder?
    Thanks in advance,
    Vanessa

    Hi all,
    I have a formula column with formula like this:
    function percent1Formula return Number is
    v_percent number;
    begin
    v_percent := (:qty1 - :qty2) / :qty2 * 100;
    return(v_percent);
    end;
    It gives me REP-1401 Fatal PL/SQL/ error.
    Does anyone know how to write percentage formula in report builder?
    Thanks in advance,
    Vanessa Hi Vanessa,
    what happens if :qty2 is zero?
    it raise zero_divide exception.
    so u need to write exception handler for that case
    ur code will look like
    function percent1Formula return Number is
    v_percent number;
    begin
    v_percent := (:qty1 - :qty2) / :qty2 * 100;
    return(v_percent);
    exception
    when zero_divide then
    <do what u want to do in this case>
    return(....);
    when others
    <do what u want to do in this case>
    return(....);
    end;
    hope it is clear.
    kiran.

  • Calculating percentage change in pivot table

    Hi,
    In my requirement i want calculate percentage change of revenue in month wise(i.e.,by comparing current month previous month).that result should display in pivot table.but iam not getting values.can any one know.plz give sol ASAP

    Read these:
    http://catb.org/~esr/faqs/smart-questions.html#homework
    http://catb.org/~esr/faqs/smart-questions.html#beprecise
    Try again, and hopefully, there will something someone can respond to. But don't ask to "give the solution." That's your job. We'll help, if we can and if we have the time. Good luck.

  • Calculating Percentages in Blocks

    Hello Guys,
    I needed your help to create pertages in blocks in cross tabs.
    Below is my requirement and atatched the screenshot.
    I have created the cross tab and applied the breaks in the 1st column and also in the header and got the totals and grand total. But I want to create the percentages of Grand total to the individual cells.
    For example:
    X              1
                    2
                    3
    Total       6
    Y            4
                  5
                 6
    Total   15
    Grand total 15+6 =21
    I need the percentages like this In the same format.
    X              1/21
                    2/21
                    3/21
    Total       6/21
    Y            4/21
                  5/21
                 6/21
    Total   15/21
    Grand total 15+6 =21
    Can you please help me out in the issue.

    In the Table footer it is showing wrong valuesmit has to show 132908, but it is showing 135695.
    all other values are fine.

  • Calculating Percentages using int

    Hi,
    How would I calculate a percentage when the initial values I have are int primitives, so that the percentage is rounded to the nearest whole number. i.e. 4/6 equates to 67%
    Thanks in Advance.

    int x = 4;
    int y = 6;
    int percentage = (int) (Math.rint(x * 100.0 / y));

  • Query Assistance - Calculating percentage

    Greetings,
    I may just be looking at this for way to long and not seeing the proper coding/syntax
    required to accomplish what it is I am trying.
    I have one query to figure out an overall count for each organization in a database. I
    then have a second query to figure out the success rate count to compare to the
    overall count per organization. I am running the second query inside the <cfoutput>
    of the first query to achieve the desired count/display intended.
    The overall and the success counts are displaying as I intend them to. However, I
    am unable to get the percentage part to work. Perhaps someone can look at my
    code and layout to see where it is I am failing. I have provided the desired look and
    my code below for review.
    I am certainly open to suggestions on how to do it differently / better, should someone
    have an insight on how to accomplish my desired outcome.
    CF = CF8
    DB = MySQL
    Thanks in advance
    Leonard B
    ===== Desired Look =====
    Total Attempts
    First Attempts
    Percent
    Organization Name
    20
    18
    Org. Name
    40
    33
    Org. Name
    51
    44
    Org. Name
    ===== Code Below =====
    <cfquery name="rs_attempts" datasource="DSN">
    SELECT
    Count(airway_management.agency_cert_number) AS agency_count,
    airway_management.agency_cert_number,
    airway_management.year_of_call,
    airway_management.et_attempts,
    airway_management.et_attempts_successful,
    airway_management.dept_org
    FROM
    airway_management
    WHERE
    airway_management.year_of_call = <cfqueryparam cfsqltype="cf_sql_integer" value="2009">
    GROUP BY
    airway_management.dept_org
    </cfquery>
    <table width="0" border="1" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
        <td><div style="font-family: Arial; font-size: 13px">Total Attempts</div></td>
        <td><div style="font-family: Arial; font-size: 13px">First Attempts</div></td>
        <td><div style="font-family: Arial; font-size: 13px">Percent</div></td>
        <td><div style="font-family: Arial; font-size: 13px">Organization Name</div></td>
    </tr>
    <cfoutput query="rs_attempts">
    <tr>
        <td><div style="font-family: Arial; font-size: 13px">#agency_count#</div></td>
            <cfquery name="rs_1_attempts" datasource="DSN">
            SELECT
            agency_cert_number,
            dept_org,
            year_of_call,
            et_attempts,
            et_attempts_successful
            FROM
            airway_management
            WHERE
            year_of_call = <cfqueryparam cfsqltype="cf_sql_integer" value="2009"> AND
            agency_cert_number = <cfqueryparam cfsqltype="cf_sql_varchar" value="#rs_attempts.agency_cert_number#"> AND
            et_attempts = <cfqueryparam cfsqltype="cf_sql_integer" value="1"> AND
            et_attempts_successful = <cfqueryparam cfsqltype="cf_sql_varchar" value="Yes">
            </cfquery>   
            <cfset percent = ((#rs_attempts.recordcount# - #rs_1_attempts.recordcount#)*100)>
        <td><div style="font-family: Arial; font-size: 13px">#rs_1_attempts.recordcount#</div></td>
        <td><div style="font-family: Arial; font-size: 13px">#NumberFormat(percent,999.00)#</div></td>
        <td><div style="font-family: Arial; font-size: 13px">#dept_org#</div></td>
    </tr>
    </cfoutput>
    </tbody>
    </table>

    Try replacing this line
    <cfset percent = ((#rs_attempts.recordcount# - #rs_1_attempts.recordcount#)*100)>
    with
    <cfset percent = #(rs_attempts.recordcount - rs_1_attempts.recordcount)*100#>
    Not sure on the brackets though - if not try
    <cfset percentWorking= #rs_attempts.recordcount - rs_1_attempts.recordcount#>
    <cfset percent = #working * 100#>
    Mi-ul

Maybe you are looking for