Sum of the column

HI All
   This is krishna, I created one user defined field in existing matrix. I want total sum of the column for that field. 
per suppose, i entered four rows.. when i click the the fifth row of that column, it will be shows, total four coumns result on that field... If any body having the result. plz send me..

krishna,
Take a look at the SystemFormManipulation SDK Sample.
The steps are:
1. Catch the system form load and update that form with you user field
XML form sample
<?xml version="1.0" encoding="UTF-16" ?>
<Application>
     <forms>
          <action type="update">
               <form FormType="150" uid="">
                    <items>
                         <action type="add">
                              <item uid="_Family01" type="8" left="25" tab_order="0" width="80" top="160" height="14" visible="1" enabled="1" from_pane="99" to_pane="99" disp_desc="0" right_just="0" description="" linkto="Family01" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                                   <AutoManagedAttribute></AutoManagedAttribute>
                                   <specific caption="Familia 1"></specific>
                              </item>
                              <item uid="Family01" type="16" left="110" tab_order="0" width="150" top="160" height="14" visible="1" enabled="1" from_pane="99" to_pane="99" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                                   <AutoManagedAttribute></AutoManagedAttribute>
                                   <specific TabOrder="0">
                                        <databind databound="1" table="OITM" alias="U_Family01"></databind>
                                   </specific>
                              </item>
                              <item uid="_Family02" type="8" left="25" tab_order="0" width="80" top="175" height="14" visible="1" enabled="1" from_pane="99" to_pane="99" disp_desc="0" right_just="0" description="" linkto="Family02" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                                   <AutoManagedAttribute></AutoManagedAttribute>
                                   <specific caption="Familia 2"></specific>
                              </item>
                         </action>
                    </items>
               </form>
          </action>
     </forms>
</Application>
2. Catch the click on the Add/Update button of the system form, calculate the column's total, and put it in your user field.
Regards,
Vítor Vieira

Similar Messages

  • Discoverer  report does not sum up the column

    Hi All,
    I am running the discoverer report from discoverer desktop and was
    trying to use the sum function to sum the total amount of the report.
    The sum function does not work and it only display Cell
    Sum: (blank) with no actual data.
    When i checked the report details some columns are calculated based on the columns which i want to sum up.
    Any ideas please share with me
    Thanks in advance.

    b) What is the difference between sum and cell sum? Well, I certainly won't claim to be a Discoverer guru. From what little I have seen, the practical result is not any difference really between the two. SUM of a calculated row is adding up the calculation to the total. Whereas cell sum is like adding up the individual values behind the calculation you see. The distinction makes more sense when you have SUM DISTINCT and CELL SUM DISTINCT being involved. Then you will see a difference in the calculated total. But for SUM and CELL SUM itself, I have not seen any difference between the two, but I am still pretty new to Discoverer.
    e) Aggregate field from a folder. Well, this may be one where you have to play around with your own data to understand. Let me try to give you a simple example. Let's say you have a sales table with 100 rows. You have sales data for 5 cities, and each city has 20 rows of sales history. If you pick Sales Dollars Detail and City Name for your workbook and run, you will get 100 rows in your result (complete detail listing). So that is what happens with no aggregation. Now, instead of doing Sales Dollars Detail, you pick Sales Dollars Sum (the same thing as saying SUM(Sales Dollars) in an SQL statement). Run the workbook. You will now get 5 rows of data, instead of 100 rows of data. You will get one row for each city. If you look at the SQL that Discoverer generates, you will see that it has now done a GROUP BY in the SQL statement. Notice I have not said anything about DISTINCT (just trying to keep things simple).
    Now, lets say you do a workbook for City, Part Number, and Sales Dollars Sum. Run the workbook. You get a summarized result (say maybe 10 rows of summary data this time). If you look at the Discoverer SQL, the GROUP BY is now by city and part number, automatically doing that because you picked the SUM version of sales dollars.
    Now lets say you add Sales Units Detail to the workbook. Discoverer will give you a warning message that you are have both an aggregate and a non-aggregate and that you may end up with unpredictable results. Run the workbook. You will be back to 100 rows, because you specified sales units in detail.
    Most of the time I do not want to see detail rows in a workbook. So most of the time I am picking the SUM aggregate for an amount item.
    Hope this explains things a bit. Sounds like maybe you need to take the Discoverer Create Queries and Reports class. Would help you understand these things better. Good luck.
    John Dickey

  • Discoverer plus  report does not sum up the column

    Hi All,
    I am running the discoverer report from discoverer plus (web version) and was
    trying to use the sum function to sum the total amount of the report.
    The sum function does not work and it only display Cell
    Sum: (blank) with no actual data.
    When i checked the report details some columns are calculated based on the columns which i want to sum up.
    My query uses CASE function to calculate one of the columns.
    I changed the aggregation behavior setting to "Show the sum of the calculated values from the contributing cells "
    then also i'm not able see the totals.
    Any ideas please share with me.
    Thanks in advance,

    Hard to answer your question without seeing what you are trying to do. Issues like this are often better reported to Oracle support, where they can get a web sesison going and be able to see what you see on your computer. Would be helpful to illustrate exactly what your detail looks like and how you are trying to create your sum. There could be several possible issues that could cause your problem, so all I can do is speculate some. Are you trying to sum one column, or are you creating multiple totals (for multiple columns)? Do you have any rows in the column with a NULL value? NULL values will be a problem when trying to sum up a column. You would need to convert the NUll value to something else, probably a zero. That would be the first thing I would look at. Hope that helps a little bit.
    John Dickey

  • Possibly a very basic question but I have set up a spread sheet in Numbers and have viewed help videos but I can't get it to give me sums for the columns I highlight.  Keeps coming up with the figure zero.  I have version 09 2.3(554). Can anyone help

    Possibly a very basic question but I am going nowhere without a solution.  I have set up a spreadsheet in Numbers but it won't give me sums for chosen columns. I  have viewed the run through videos and used the formula but nothing happens apart from giving a figure of zero or a red arrow.  The sum icon in the bottom left hand section of the window does not highlight or show any total as I understand from the video that you can drag whatever total is here onto the relevent position on your spreadsheet.  I have Numbers 09 version 2.3 (554). Can anyone advise. Thanks.

    Hi Sohojools,
    To sum a column, use a formula such as this one in Cell A6
    Type this in a cell below your data:
    =SUM(A2:A4) or whatever range of cells you want to sum. The easy way is to type:
    =SUM(
    and then drag or shift-click to select the range of cells. Close the formula with a final bracket ")".
    The sum icon in the bottom left hand section of the window does not highlight or show any total
    To see the sum (and other simple statistics) in the bottom left, select a range of cells. That tells Numbers which cells you are refering to.
    The videos are good, but the Numbers'09 User guide, and the Formulas and Functions User Guide are better. Download them from the Help Menu in Numbers.
    Regards,
    Ian.

  • Finding Sum of the column whose column name is numeric value

    HI All -
    I have column names as years like 1990, 1991, 1992 and there are certain amount like below
    *1990 1991 1992*
    1000 5000 6000
    2000 2000 3000
    SUppose I want to find the sum of the amounts for year 1990, and I use the query like Select SUM(1990), it returns the sum of 1990+1990. How to make sure that 1990 is recognized as a column instead as a number.
    Thanks

    Hi,
    To reference a column name that does not follow the normal rules (and starting with a digit does not follow the normal rules), then enclose the column name in double--quotes:
    ...  SUM ("1990"),  ...You can enclose any identifier in double-quotes, even ones that do follow the normal rules, but remember that anything inside any kind of quotes is case-sensitive.
    If your query is assigning column aliases, like "1990", you might want to assign them only in the main query, after all references to them (like the SUM function you mentioned) have been done.
    Depending on your front-end, you might get the same results by having the front end do the aliasing. For example, the SQL*Plus COLUMN command can assign an alias (like "1990") to a more gernerically named column (like year_1). Then you could use the noramlly named column throughout the query:
    COLUMN  year_1  HEADING "1990"
    SELECT  year_1
    ...     SUM (year_1)
    ...

  • Sum of the column in one array

    Hi, I am a new user of Labview.
    I am using a simulator composed by different for loops. This simulator saves in an unique txt file one column for each step.
    Each colomn has 1024 elements. Thus, for example,  if the number of steps is 10, the final txt file will has 10 columns of 1024 elements each. How is it possible to sum all these columns obtaining a unique final column with again 1024 elements and then to calculate a column which represents the mean of all the others?
    Mario
    PS. I am using Labview 7.1

    Here's a simple solution. It should work with any size of 2D array and simply add two more columns with the desired values (sum and mean)
    Message Edited by altenbach on 11-20-2007 06:07 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    SumArray.png ‏21 KB

  • Divide a column by the Sum of the Column

    Hi!
    I have a challenge in dividing a column by the total of that same column. What I wan to archive is first check if a column is zero before dividing by the total of the column  and then multiply by 100 to get the percentage of total contribution.
    Below is a sample image. I equally will want to round up to 2 decimal places. As it below, the percentage contribution column is derived from the CountOfProduct column
    Thanks so much for the help
    Zionlite

    Use the SUM() OVER() window function, e.g.:
    DECLARE @tablename TABLE
    product VARCHAR(30) ,
    category INT ,
    prodcnt INT
    INSERT INTO @tablename
    VALUES ( 'PROD1', 1, 11 ),
    ( 'PROD2', 1, 10 ),
    ( 'PROD3', 2, 13 ),
    ( 'PROD4', 2, 40 ),
    ( 'PROD5', 3, 1 );
    SELECT O.product ,
    O.category ,
    O.prodcnt ,
    1.0 * O.prodcnt / ( SELECT SUM(I.prodcnt)
    FROM @tablename I
    FROM @tablename O;
    SELECT O.product ,
    O.category ,
    O.prodcnt ,
    1.0 * O.prodcnt / SUM(O.prodcnt) OVER ( )
    FROM @tablename O;
    SELECT O.product ,
    O.category ,
    O.prodcnt ,
    1.0 * O.prodcnt / ( SELECT SUM(I.prodcnt)
    FROM @tablename I
    WHERE O.category = I.category
    FROM @tablename O;
    SELECT O.product ,
    O.category ,
    O.prodcnt ,
    1.0 * O.prodcnt / SUM(O.prodcnt) OVER ( PARTITION BY O.category )
    FROM @tablename O;
    Data by
    Prashanth.
    Caveat: For further processing avoid to formatting of the fraction to percent. Do this in the front-end.

  • How can I make a column of sums of the column next to it up to the row each sum is on?

    Hi Forum,
    I would like to find a fast way to do this:
    Numbers
    Sums
    1
    1 [sum of cell 1]
    2
    3 [sum of cells 1 and 2]
    3
    6 [sum of cells 1 through 3]
    4
    10 [sum of cells 1 through 4]
    5
    15 [sum of cells 1 through5]
    6
    21 [sum of cells 1 through 6]
    7
    28 [sum of cells 1 through 7]
    8
    36 [sum of cells 1 through 8]
    9
    45 [sum of cells 1 through 9]
    10
    55 [sum of cells 1 through 10]
    I have 500 cells.  I know how to do the SUM function one sum at a time, but I am hoping for an easier technique.
    Bruce

    the first thing to realize is that each sum is the sum of all the previous rows plus the row you are on.  This means that each row can simply add itself to the previous sum.
    row 1 is a special case because there is no row before it so B1 = A1.
    All other rows in B are:
    Bn = B(n-1) +An   (where n is the current row number)
    Wayne
    Message was edited by: Wayne Contello

  • Sum of the column with the same name in diffrent tables.

    Hi,
    Please let me know the query to find the sum of a particular column of various tables like A,B,C,D & E as an output if i enter a particular date.
    Eg.
    Tables A:
    Date aaa
    1/1/2000 10
    Tables B:
    Date aaa
    1/1/2000 15
    Tables C:
    Date aaa
    1/1/2000 20
    Tables D:
    Date aaa
    1/1/2000 30
    Tables E:
    Date aaa
    1/1/2000 40
    The output should be 115 wrt to the date entered in the Date column.
    Regards,
    Rahul

    Hi,
    This should work............
    select dt, sum(aaa)
    from (
    select dt, aaa
    from A
    union all
    select dt, aaa
    from B
    union all
    select dt, aaa
    from C
    group by dt
    cheers
    Mahesh

  • How to count number of rows as well as the sum of a column in a procedure

    Hi, i need to count the number of rows a sql returns in a procedure.
    as well as i need to sum up a different column.
    i need the following output:
    count the number of rows output
    and sum the total column
    code:
    procedure samba_extraction (p_errmsg IN out varchar2
    ,p_errcode IN out NUMBER
    ,p_filename in varchar2
    ,p_start_date varchar2
    ,p_end_date varchar2)
    is
    file_handle utl_file.file_type; -- file handle of os flat file
    -- cursor to select the c_samba_resources
    cursor c_samba is
    select
    lpad(h.contract_number,15,'0') contract_number
    ,h.short_description description
    ,h.attribute_category context_value
    ,h.attribute7 samba
    ,h.attribute8 samba_number
    ,h.start_date start_date
    ,h.end_date end_date
    ,h.sts_code active_inactive
    ,l.price_negotiated price
    ,l.tax_amount tax
    ,LTRIM(to_char((l.price_negotiated + l.tax_amount),'00000000.00')) total
    from
    oks_auth_headers_v h
    ,oks_auth_lines_v l
    where h.id = l.chr_id
    and ((h.start_date <= (p_end_date))
    and (h.end_date >= (p_start_date)))
    and h.attribute7 = 'SAMBA'
    -- and h.sts_code = 'ACTIVE'
    and ((h.attribute_category = 'SUBSCRIPTION.DURATION')
    or (h.attribute_category = 'SUBSCRIPTION.VALUE')
    or (h.attribute_category ='SUBSCRIPTION.QUANTITY'));
    l_output varchar2(1000);
    l_counter varchar2(11);
    l_total varchar2(11);
    l_filename varchar2(30);
    begin
    if p_filename IS NOT NULL then
    -- l_batch_no := 'T';
    l_filename := p_filename || '.txt';
    -- open file to write into and obtain its file_handle.
    file_handle := utl_file.fopen('/usr/tmp',l_filename,'W');
    fnd_file.put_line(fnd_file.log,'The '|| l_filename||' file you have requested has been placed in the usr/tmp directory');
    for l_info in c_samba
    loop
    -- l_output := null;
    l_output := l_info.samba_number||'+'||l_info.total||l_info.contract_number;
    utl_file.put_line(file_handle,l_output);
    fnd_file.put_line(fnd_file.output, l_output);
    dbms_output.put_line(l_output);
    end loop;
    else
    p_errmsg := ('Please enter a filename for this file ');
    write_log('UPDATE : ' ||p_errmsg);
    end if;
    -- close the file.
    utl_file.fclose(file_handle);
    exception
    when no_data_found then
    dbms_output.put_line('no_data_found');
    utl_file.fclose(file_handle);
    when utl_file.invalid_path then
    dbms_output.put_line('UTL_FILE.INVALID_PATH');
    utl_file.fclose(file_handle);
    when utl_file.read_error then
    dbms_output.put_line(' UTL_FILE.READ_ERROR');
    utl_file.fclose(file_handle);
    when utl_file.write_error then
    dbms_output.put_line('UTL_FILE.WRITE_ERROR');
    utl_file.fclose(file_handle);
    when others then
    dbms_output.put_line('other stuff');
    utl_file.fclose(file_handle);
    end samba_extraction;
    end xx_samba;

    Hi,
    Initialise one variable TOT_ROWS to 0.
    Then in the for loop
    tot_rows := tot_rows + +1 ;
    so after for loop the value in the tot_rows will be the total records..
    If u want it to get this value in the calling procedure of this , just declare tot_rows parameter as out parameter.
    For sum of a column:
    Initialise a variable sum_col to 0.
    In the for loop
    sum_col := sum_col+I_info.column_name
    aprameter if u wish return this value as out..
    I think this wil give u the o/p..
    cheers,
    Sivarama

  • How to sum the column in a table seperated by sign.

    How to sum the column in a table separate by sign.
    For Example:
    A B
    10 MOHAN
    -15 KUMAR
    -25 MARCH
    50 MAY

    SELECT  SUM(CASE SIGN(A) WHEN 1 THEN A ELSE NULL END) SUM_POSTIIVE,
            SUM(CASE SIGN(A) WHEN -1 THEN A ELSE NULL END) SUM_NEGATIIVE
      FROM  tbl
    /SY.

  • How to calculate the individual sums of multiple columns in a single query

    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    Thanks

    user13667036 wrote:
    Hello,
    Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
    Will appreciate any help or suggestion.
    ThanksLooks like you want a simple group by.
    select
              yr
         ,      mnth
         ,      region
         ,     sum(handled_package)
         ,     sum(expected_missing_package)
         ,     sum(actual_missing_package)
    from test
    group by
         yr, mnth, region
    order by      
         yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
    CREATE TABLE test
         year_month                              date,
        Region                     VARCHAR2(50),
        CITY                       VARCHAR2(50),             
        Handled_Package            NUMBER,       
        Expected_Missing_Package   NUMBER,   
        Actual_Missing_Package     NUMBER
    alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
    ERROR at line 1:
    ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
    Elapsed: 00:00:00.03
    ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
      2  Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?select
      2        to_char(year_month, 'fmYYYY')    as year
      3     ,  to_char(year_month, 'fmMonth')   as month
      4     ,  Region
      5     ,  CITY
      6     ,  Handled_Package
      7     ,  Expected_Missing_Package
      8     ,  Actual_Missing_Package
      9  from test;
    YEAR         MONTH                REGION                         CITY                    HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
    2012         November             Western                        San Fransisco                       200                       10                      5
    1 row selected.
    Elapsed: 00:00:00.01
    ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
    Cheers,

  • How to get the sum in appropriate column without a red triangle appearing?

    Hello,
    In 'Numbers" - How do get columns to add (calculate) the sum in each decending column on an Expense Report.
    When I highlight the decending column the total appears on the far left of the screen.  When I drag the sum amount from there to the appropriate column a red triangle with an ! appears instead of the amount.
    Thanks for your immediate help.

    The red triangle is an Error triangle. Clicking it will display the error message and tell you what error has occurred. From your description, my assumption is that you dragged the SUM() function from the quick calculations at the lower left and dropped it intto a cell in the column being summed.
    If that's the case, this is likely the error message you would see:
    When you highlighted the 'decending column,' you likely selected all of the cells in that column, including the one into which you dropped the function.
    Instead, do one of the following. These assume the column you want to sum is column B.
    If you want the sum at the top of the column:
    Make sure the row you want the sum to appear in is a Header row.
    Enter this formula into any Header Row cell in column B:   =SUM(B)
    If you want the sum at the bottom of the column:
    Add a Footer row to the table. (Go Table (menu) > Footer Rows > 1).
    Enter this formula into the Footer Row cell in column B:   =SUM(B)
    SUM (and other functions) that expect a range of cells will interpret a cell reference entered using only the column letter (B) as meaning 'all of the non-header, non-footer cells in column B', and will exclude those cells in header or footer rows.
    Regards,
    Barry

  • Issue in calculating sum on a column at the end of the report in Pivot view

    Hi,
    I have some columns like Hierarchy column A, Non Hierarchical columns B, C and a measure D.
    In Pivot view under rows I have placed columns A,B and C in Columns and D in measures. If I try to calculate sum of values at the end of report by using option Sum At the End on columns we are getting an error that grouping by function should be in the select clause of the query.
    If I duplicate the column C and put it in rows then I am able to see totals at the end but values are displayed in multiple rows and it won't meet our requirement.
    Any suggestion or workarounds on this will be helpful.
    Thanks,
    Vj

    Hi,
    let me explain it better..
    Col A: GL Segment Hierarchy which will display Level1 to Level n Names
    Col B: Level n Code.
    Col C: Fiscal Period
    Col D: Amount
    Now col A and B are in Rows, col c in columns and col D in measures in a pivot view.
    Issue is we are unable to have total of measure values at the end of report by using sum at the end.

  • How to get the sum of  a column in a table layout region

    i have page table layout region and i have many rows in that ...i have a column say xyz now i want the sum of all xyz in all rows ...is that possible ..if it is how..????
    please help me out in this issues...so that i can proceed further with my work..im stuck otu here....if the solution r there in the devguide please tell me where it is ..i mean under which section...bcoz it 1400page document...

    If you are mentioning about table/advanced table region you can enable totalling in those regions. Please check the Table / Advanced Table section as appropriate in Chapter 4 of the dev guide.
    If it is not a table / advancedTable then you will have to programmatically total the column value and display it in the appropriate cell.

Maybe you are looking for