Calculating Percent totals and Averages in SSRS

Below is a report created using SSRS. I want to be able to calculate the percentage(%) total to add up to 100 % in the Total column. For some reason my averages are not working as you can see from the table. The idea is to calculate the averages of opportunities
as well as Sold. But from my calculation, things are not adding up as I supposed. This report is not grouped by parent. How do I make this to work as it should? Thank you.
(NB: Please zoom in to view the image)
Zionlite

Hi,
According  to the description, I doubt you may manually add Total and Averages columns. Did you manually add Local and International or they were in a column group?
You can use the following expression for the Opportunity Cost(averages) column in the total row:
=Sum(Fields!opportunitycost.Value)/2
How did you calculate the percentage column? If it is Sold value divided by Opportunity Cost value, use:
=Sum(Fields!sold.Value)/Sum(Fields!opportunitycost.Value)
Also try to define the scope in the expression and see if it make difference.
If there is no progress, please capture the screenshot of your design tab.(Click on the report and capture the image of your report structure)
Also, tell us the expression of the text box which in problem.
Thanks.
Tracy Cai
TechNet Community Support

Similar Messages

  • Calculate total and average for same key figure

    Hi Experts,
    I have a requirement where I need to calculate total and average for same key figure no of employees.
    eg:                
    If I enter 03,2009 as Input the reuslt should give from financiual year starting to current month.
         11.2008      12.2008     1.2009     2.2009     3.2009        average
             11          10       12       10        10         10.6
             10         10       11       12        10         10.6
    total         21         20       23       22        20          21.2
    we have only one characteristic in rows... companycode.
    Waiting for your Inputs.
    Regards
    Prasad Nannuri

    no it will work for u
    you have to use variable on 0calmonth or fiscal period depending on what Time characteristic u are using.
    lets say that variable is zcalmonth
    it is based on 0calmonth for e.g.
    now u restrict keyfigure with this variable zcalmonth with time char. = 0CALMONTH
    copy and paste the restricted keyfigure
    now set offset for variable in  variable selection screen dialog box = -1
    repeat this until u want
    make this variable mandatory
    now at query execution user will select any value for month/year
    and u will see all 5 months in result set
    now there can be maximum 12 months in a year, so u end up creating only 12 restricted keyfigures.
    use YEAR in restricted keyfigure too, and restrict it with YEAR VARIABLE processing by CUSTOMER EXIT = CURRENT YEAR
    in this case it will automatically removes any additional values...
    for e.e.g
    YEAR = 2008 only
    User entered 6/2008
    so lets say ur financial year starts in  april 2007 and ends in april 2008
    so u expect to see
    4/08
    5/08
    6/08
    but u created 12 restricted keyfigures , so it will show upto
    4,5,6 months only

  • Total and Average in RESULT of same keyfigure?

    Hi guyz,
    Just want to ask if having the SUM and AVERAGE result of one (1) keyfigure is possible in BEx Query Designer?
    Here is the report:
                                                                  Volume
    Customer A           Material X               100
                                     Material Y               200
                                     Material Z               300
                                     RESULT                600             --->  total --- (100 + 200 + 300) = 600
    Customer B           Material X              400
                                     Material Y              500
                                     Material Z              600
                                     RESULT               1500           ---> total --- (400 + 500 + 600) = 1500
    RESULT                                                1050           ---> average of result --- (600 + 1500) / 2 = 1050
    How will I do the AVERAGE? I already got the TOTAL since it's the DEFAULT in CALCULATION tab. But is it possible to also have the AVERAGE?
    Thank you!
    Loed

    Hi Loed,
    You can try to use Exeption aggregation to acheive this.
    OR
    You can use cell restrictions and get this done.There are many documents avaliable for Cell Restrictions
    Rgds
    SVU123

  • Percent of total and percent of completion?

    would anyone mind helping me with which equations to use for a "percent of total" and percent of completion equations?
    i have a total amount and i would like to list the various items that make up this total in chronological order so i can see the percentage in percentage and in actual dollars but also as a "percent completion" in percentage and in real dollars.
    i am envisioning something like this for percent - percent completion - dollars per item - dollars per completion
    line 1     1%          1%               $1          $1
    line 2      2%          3%               $2          $3
    line 3     97%          100%          $97          $100
    total      100%                           $100
    i am a little new to this so any suggestions will help a great deal.
    THANKS

    hi barry.
    thank you.
    i have a construction budget with - say - 18 items. these 18 items go chronologically from start to finish for the construction. i would like to show what percentage of the total budget each item is (percent of total dollars i guess) but i would also like to sum up the "percent completed" for each line item so that when you looked at the results for - say line 8 - you could see that you were X% completed for the whole project in terms of the total dollars allotted for the whole project (100%).
    what i was envisioning was that it would be possible to do this both in terms of a number for the /percent/ of each of these but also in terms of a /dollar/ amount for each of these.
    one set would be the individual line item and the other set would be added up as you went down the list and completed the work.
    THANKS

  • How to show subtotal and total of groups in ssrs

    I am making an SSRS report in following format:
        DIVISION  
              SECTOR  
                    DEPARTMENT
    Division contain Sector and Sector contain Department so resulting report becomes something like following. A figure is being shown against each Department and I want to show SUBTOTAL of each Sector right against Sector column (by adding all Department coming
    under it) and then show TOTAL of Division (by adding all Department or all Sector) at the end. How do I show these totals? 
        Division1
             Sector1               SUBTOTAL HERE (for e.g. 19,000)
                  Department1      10,000
                  Department2      9,000
             Sector2               SUBTOTAL HERE  (for e.g. 8,000)
                  Department3      8,000
             Sector3               SUBTOTAL HERE  (for e.g. 13,000)
                  Department4      10,000
                  Department5      1,000
                  Department6      2,000
                                   TOTAL HERE  (for e.g. 40,000)
        Division2
             Sector4               SUBTOTAL HERE (for e.g. 3,500)
                  Department7      3,500
                                   TOTAL HERE (for e.g. 3,500)
    My report is displaying all divisions, sectors and departments with figures like above (I am using groups ) but how do I display SUBTOTAL and TOTAL?

    Hi ,
    You can use add total in this case.
    use below link;
    http://msdn.microsoft.com/en-in/library/ms170712.aspx
    To add totals to a report
        Switch to Design view.
        Right-click the data region cell that contains the field [LineTotal], and click Add Total.
        This adds a row with a sum of the dollar amount for each order.
        Right-click the cell that contains the field [Qty], and click Add Total.
        This adds a sum of the quantity for each order to the totals row.
        In the empty cell to the left of Sum[Qty], type the label "Order Total".
    To add a daily total to a report
        Right-click the Order cell, point to Add Total, and click After.
        This adds a new row containing sums of the quantity and dollar amount for each day, and the label "Total" in the Order column.
        Type the word Daily before the word Total in the same cell, so it reads Daily Total.
        Select the Daily Total cell, the two Sum cells and the empty cell between them.
    To add a grand total to a report
        Right-click the Date cell, point to Add Total, and click After.
        This adds a new row containing sums of the quantity and dollar amount for the entire report, and the Total label in the Date column.
        Type the word Grand before the word Total in the same cell, so it reads Grand Total.
        Select the Grand Total cell, the two Sum cells and the empty cells between them.
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem.

  • Grand totals and calculation on total in Narrative view

    Hi There,
    Is it possible to do calculations on the total values computed in the table in Narrative view.
    Iis there anyother way.
    Regards
    Ashish

    Hi,
    You told that you need to do manipulation on grand total so,add dummy columns and put grand total calculations on them and do manipulations on them to get manipulated value.
    Do you want to show manipulated values in narrative view?
    Regards,
    Srikanth

  • Sub-totals and Totals calculations....?

    How to Calculate the Sub-totals and Grand totals in ABAP Programs.

    Hi Bhaskar,
    In my opinion this can be acheived in two ways:
    1. Using ALV GRID DISPLAY
    2. Using AT NEW  , ON CHANGE OF  , etc events.
    1. In the ALV field catalogue u create entries for all the fileds to b
    displayed in the output list.
    Here, we need to put DO_SUM = 'X' .
    eg
      ****************fieldcatalog*********************
    data:anytab type slis_t_fieldcat_alv with header line.
    **************pgm name**********************
    data:anypgnm type sy-repid.
    **************events*************************
    anytab-fieldname   = 'MATNR'.
      anytab-seltext_m   = 'Material Number'.
      anytab-col_pos     = 0.
      anytab-outputlen   = 20.
      anytab-emphasize   = 'X'.
      anytab-do_sum = 'X' .                  <----
    here it is.
      append anytab to anytab .
      clear  anytab .
    Now wen u call the fm REUSE_ALV_GRID_DISPLAY , plz pass anytab ie fieldcatalog  and  the tabel with records to  b displayed .
    this would  sum the fields at the end.
    2.  Alternately ....for SUb-totals ;
       Sort itab in an ascending manner.
    Data : wa_itab    like line of itab,
              wa_subtotal type i.
    " fieldname1 in itab is the key field
    " fieldname2 is the value field
    LOOP at itab into wa_itab .
      wa_subtotal = wa-subtotal  + itab-<fieldname2>.
      AT END OF <fieldname1> .
          " your programming logic for subtotal
           Write :/ wa_itab-fieldname1 , wa_subtotal.
           Clear  wa_subtotal.
       ENDAT.
       " write :/  ....if u need to write any lofgic values ....
    ENDLOOP .
    Note : plz sc if a field in itab that is left of fieldname1 changes
              the AT END OF event is triggered.
             Therefoe , see that  pur key fields towards left in itab.
    FYI : u can try ON CHANGE OF....ENDON....
                          AT NEW .....ENDAT
                           AT LAST....ENDAT
                           AT FIRST ......ENDAT  events for ur own understanding
    i hope this helps u.
    Regards
    panakj

  • Alv - sub  totals and avg

    Hi gurus,
    I have a problem, please help me out.
    Iam doing an report program with alv display. In that iam calculating the AVG for the workcenter wise for the field TAT.
    please observe my below o/p in general ALv  format.
    work center-- TAT- Tat(Yes/no)
    qm0010------ 1 --  yes
    qm0010-------2 --  yes
    qm0010------ 4 -- yes
    qm0010------ 7 -- No (because >5)
    Subtotal(qm0010)--3  (avg caluculated)
    qm0020--  4 --- yes
    qm0020-7-- No (because >5)
    qm0020--10 - No (because >5)
    qm002010- No (because >5)
    Subtotal(qm0020)-- 7 (avg caluculated).
    this is the rough o/p iam getting . this is acheived by programming the Field catalog for TAT field i.e... do_sum  = 'C'.
    then giving the sort table to REUSE_ALV_GRID_DISPLAY.
    Now my problem is:
    I want the avg to be calcuted by the business formula which is:
    avg  =  sum of(TAT within 5 days) / total no of the entries .
    Ex:
    work center-- TAT- Tat(Yes/no)
    qm0010------ 1 --  yes
    qm0010-------2 --  yes
    qm0010------ 4 -- yes
    qm0010------ 7 -- No (because >5)
    Subtotal(qm0010)---*7/4=2 (avg caluculated for tat<5)*
    qm0020--  4 --- yes
    qm0020-7-- No (because >5)
    qm0020--10 - No (because >5)
    qm002010- No (because >5)
    Subtotal(qm0020)--4/4=1 (avg caluculated for tat<5).
    How can i acheive the above, since in field catalog and alv, i think we cannot pass any conditions(like for TAT which is less than 5). So is there any other way to acheive the above.
    Please understand the problem and give me(please directly dont suggest any programs , since iam not a expert to understand)..
    Please explain me in detail.  Points will be duly rewarded.
    Thanks in advance........Chaitu
    Edited by: chaitanya on May 30, 2008 12:33 PM
    Edited by: chaitanya on May 30, 2008 12:38 PM
    Edited by: chaitanya on May 30, 2008 12:39 PM

    Hi Chaitanya,
       You can display in your report with totals and sub-totals using alv, but not average. That functionality has not provided by sap. Do one thing add one more extra column Average in your output, do the calculation for average and pass the value in the coding itself. Then last display your report with Average field.
    Rgds,
    Bujji

  • Calculating Grand Total based on the section totals

    Hi,
    I have a webi report with a section. Outside the section block I have a grand total block. I have a section on Shop Names. At the total level I calculate calls per hour average. So at the end of each sections the total would look like
    Shop 1
    Shop 1 Calls : 61
    Shop 2
    Shop 2 Calls : 45
    I need to calculate call per hour at the grand total ...which should average the totals in the section
    Grand Total : 61+45 = 106/2=53. I needed guidance as to how based on the section totals I can write a formula to calculate averages of the values present in the section. Both are different blocks ( Section and Grand Total)
    I cannot write a direct formula as it will give me error caculation beacuase of the nature of data in the report.
    Please let me kow on this.
    Thank You,

    Hi BOCP-BOE ,
    Thank you very much for the quick response.
    I tried with          
    =Sum([V_Calls_Per_Hour_Average]) ForAll ([V_Calls_Per_Hour_Average]) In Report
    =Sum([V_Calls_Per_Hour_Average]) ForEach ([V_Calls_Per_Hour_Average]) In Report
    But this gives me error
    I calculate calls per hour as a subtotal for each shop. ( There is a section on shop so for each shop under the section we will have calls per hour total)
    The formula to calculate calls per hour is little complex
    =If(Count([Date_Appeared];Distinct)=1;(Sum([Number Of Total Calls])/Average([Hours_Worked/60));(Sum( [Number Of Total Calls])/(Sum([Hours_Worked]/60) ForEach([Date_Appeared]) Where([Date_Appeared]<>Previous([Date_Appeared];Row)))))
    My think that the formula to calculate calls per hour has very little to do with summing the values for calls per hour. Please note that I have a V_Calls_Per_Hour_Average that holds that calculation.
    Please let me know on this.
    Thank You

  • What is the use of Alternative Calculation Type =2 and 4

    Dear Friends
    In pricing procedure in gross value, Net value for Item and Net value has Alternative calucation type is 2.
    What is the use of it?
    Without using it these value line are also fetching net value then what is the work of it. Please give me detail information with its effects in pricing condition tab page in sales document.
    Thanking You
    Arun

    Arun biswal,
    Correct Biswal. We have at varoius stages within Pricing procedure the "net value" which is calculated. Not only the alternative calculation type "2" is used if you notice carefully they are stored as subtotals at various levels.
    For Ex Gross Value  --> Subtotal =1 --> Calc type = 2
    similarly for Net value for Item --> Subtotal =2 --> Calc type = 2
    Net value 2 --> Subtotal =3 --> Calc type = 2
    See, these are used to calculate the net value at various levels in pricing. The calculation Type has got a set of routines that will facilitate us in pricing. SAP has provided certain clauclated formulas or routines to facilitate us during calculation within pricing . Here the "2" is used for calculation without tax and store it as subtotal and display it or use it for further calculations.
    We can use this "netvalue" amount for further calculations. It is used for clarity purpose when you issue a statement to customer. (like Confirmation order) at various levels like discount amt involved, Freight involved, Rebate amount invloved.....
    Even without this Calc type or using sub total u can proceed....
    Finally we have  TOTAL  --> Subtotal =A --> Calc type = 4
    In the above line we have Calc type as 4, which means when you use TAX this calc type is used .
    Routines are used to facilitate your process....
    Regards
    Sathya

  • ALV Grid Control -  Modifiy data in total and subtotal lines

    Hello all,
    I´am creating a report using ALV Grid Control. This report calculates (using delivered and returned materials) for each vendor/material-combination the return quote.
    Using the totals and subtotals function for different characteristics I want to calculate the return quote for the selected characteristic. Example:
    Material delivered returned quote
    ..4711 . . . 500 . . . 5 . . . . 1 (=returned*100/delivered)
    ..4711 . . . 400 . . . 10 . . . . 2,5
    . SUM . . . 900 . . . 15 . . . . 3,5 <-- 3,5 is the sum but I want display the calculated value 1,667
    Is there a possibility to modify data in the total and subtotal lines.
    Thank you for your answer
    Best regards
    Thomas

    you said instead of 3.5 you want to show 1,667 ..
    how is it possible...
    3,5 become 1,667
    i thought you are doing any conversions...
    vijay

  • Calculation of depreciation and interest for a particular asset class

    Hi,
    I have a problem with the calculation of depreciation and interest for a particular asset class. The assets are financial leases. The depreciation key defined is LEAS. The following are the attributes of this key:
    Dep/int             phase     base met dec-bal prd cont mult lvl chn ov
    Ord.depreciation     1     0011     001     006     001        5
    Ord.depreciation     2     0002     001     003     003
    Interest             1     0028     001     003     010
    An example of an asset is:
    Aquisition value: 1041552.71 (as migrated on 01.04.2007)
    Ordinary dep already posted: 56243.88
    Net book value: 985308.83
    Scrap Value:729086.90
    Useful life: 50 years
    Expired useful life: 9 years 1 month
    Remaining useful life: 40 years 11 months.
    Depreciation start date: 28.03.1998
    Interest calculation start date:30.03.1997
    Depreciation calculated by the system:6261.83
    Interest calculated in the year:15682.68
    I'm not able to undersatnd on what basis the system calculated the interest. I will be thankful if anyone can help me resolve this. An early reply will be greatly appreciated as I'm facing major problems due to this issue.

    Hi Mahesh,
    As per my analysis of the case the interest rates are as under
    Acq. Year                                                    Int.Percent
    9999     4          01     10.%
    9999     7          01     5.%
    9999     25          01     2.5%
    9999     999     12     01     2.5%
    As per this the Acquisition value less the Scrap Value Rs.312,465.00 @ 2.5% p.a will be Rs. 7811.64.
    Based on the above you analyse for which period interest is calculated.
    Hope it will help.
    Regards,
    Vijay

  • Witholding Tax calculation while payment and advance

    Dear experts,
    I have few questions as below. It would be great if you can help me out in this :
    In vendor master I have two WTH tax codes for invoice and payment and marked as liable.
    Incase of invoice (FB60) posting system is calcu;ating correctly and posting, but while posting no popup for to rectify the WTX code also no base amount is populating in WTH tax tab of invoice posting. Is this correct way??
    While making payment for the same invoice through F-53, system is again calculating on same open item and no popup, until I go to WTH tax tab and delete the tax amount. What is lacking in my customising of WTH tax code (payment type), to restrict WTH tax calcutaing twice ??
    While making advance payment by F-48, system not calculating WTX tax and showing tax code is mandatory, even though tax code  (V0-tax exempt) entered, no WTH tax calculation happening. I have checked all Field status of document type and recon account, nothing is mandatory. I dint know why?? Please help in this regard.
    Thanks in advance.
    Regards
    Abhi

    Hi madhu
    Thanks for explaining the process it works.
    Regarding the error I was facing earlier to enter the tax code in F-48 for the tax category was marked as ' * ' in the advance reconciliation GL. I have removed them and now the error is not coming.
    But now for the same or advance payment with F-48, I am not able post the document, though the payment WTX code is showing but not calculating the amount for the same.
    The error is
    "Withholding tax amount exceeds total bank line item amounts."
    Message no. 7Q320
    How to post it. Please help.
    Regards
    Abhi

  • Need Help in Calculation of Paid and Unpaid Break in Daily Work Schedule

    hai,
    I am a student of SAP-HCM. I am having problem with the calculation
    in Paid and Unpaid Break in Daily work schedule (Time Management).
    Please help.
    thank you
    Dev.

    Hi,
    The above screen shot is table where we maintain unpaid and paid breaks, we mention about when a break has to start under START tab and when it has to end under END button.
    Under UNPAID and PAID tabs we mention duration of break,  if its 15 mins break or half an hour or one hour depending on start and end timings.
    Suppose a shift is for 9 hours in total and client wants there should be a paid break of one hour, then out of this 9 hours shift itself  break would be considered.... and in case client wants unpaid break then shift would be for 10 hours out of which 9 hours will be working hours and one hour break.
    When this concept has to be calculated in schema processing type would be assigned to this time pair showing break accordingly either paid or unpaid.

  • How to make function: line amount total and final colum total at the bottom (Acrobat pro 9)?

    The form is like this:
    col 1
    col 2
    col 3
    col 4
    col 5
    Row 1
    amount
    amount
    amount
    line total
    Row 2
    amount
    amount
    amount
    line total
    Row 3
    amount
    amount
    amount
    line total
    Row 4
    amount
    amount
    amount
    line total
    Row 5
    colum total
    colum total
    colum total
    colum total
    The problem is that even though the calculation seems to be right, the final total, colum totals and some of the line totals don't update. The sum remains zero.
    Could there be a wrong tab order? Could somebody tell me the right order? I've tried several variations, but I just can't get it work . Could somebody help me please?
    Thanks in advance!

    It's most likely an incorrect field calculation order, which is not at all related to the tab order. In case you don't know how to set it, select "Forms > Add or Edit Fields" to go into form editing mode, and then select "Forms > Edit > Set Field Calculation Order".
    Arrange the order so it makes sense, which looks like it should be:
    col 2 total
    col 3 total
    col 4 total
    Row 1 total
    Row 2 total
    Row 3 total
    Row 4 total
    Row 5 total
    Other arrangements might be just a correct, but it's important that the row totals are in that order. You should also check it again when you have the form ready to distribute to make sure it hasn't changed as you've done further editing.

Maybe you are looking for

  • Vendor search by matchcode - account group authorisation

    We have various vendor account groups including one for paying employee expenses. We are finding that users with access to vendor matchcode search can see vendors for all account groups (including employees) listed in the search even though we have r

  • Unnecessary iPod updating

    Each time I connect my iPod Mini, iTunes will update the songs, as normal. However, I've recently noticed (perhaps just with iTunes v5) that songs already on my iPod are being updated, and I don't understand the reason for this. I'm using automatic u

  • Special characters are not displaying in ADF jsp page

    Hi All, By using ADF view controller,I am getting the data from database table but when I display the data in jsp page after special character < what ever the data is there it is not displaced.Provide any suggestions. Thanks in Advance Mani

  • Bogus Dupe Message on Import

    Since upgrading to iPhoto 6, I get a duplicate photo dialog for every image I try to import from my camera. It displays the photo in the camera, a completely different photo in the library, and asks if I want to import the dupe. Of course, the photos

  • Creating cross-functional joins in Discoverer Admin

    Hello When creating cross-functional joins, say b/w Projects and Suppliers in Disco Admin, I import the Suppliers folder and then create the joins b/w Projects and Suppliers in the Projects Business Area. However, the user needs access to both Projec