Calculating Row wise %

Hi Experts,
I am unable to find a solution on calculating row wise percentage.
My requirement goes like this
CUSTOMER---------VALUE----------------PERCENT
CUSTA------------------7--------------------(7/21)*100
CUSTB------------------5--------------------(5/21)*100
CUSTC------------------9--------------------(9/21)*100
TOTAL-----------------21
I am unable to do calculate the PERCENT.
I am using a pivot view...
Please let me know your views on how to achieve this...
Appreciate your immediate response...
-Thanks!

Hello,
go to pivot view,
Duplicate the VALUE column in measures block. Now you find 2 columns with the same name.
And for duplicated column (the 2nd one) go to More Options.. > Show Data As > Percent of > Column.
You find automatically it calculates the % value...
Ad if you want you can change the 2nd column heading to precise manner.

Similar Messages

  • Ordering row wise totals in a column.

    Hi,
    I have a report in Pivot view having two columns namely Count and Category. I have to apply sort on these two columns-first on Count and then on Category.
    The Total Count is also calculated row wise. Now when I apply sort on count column, only the values in that column are being sorted and not according to row wise total count. But my requirement is to sort the total count row wise first and then by Category.I am unable to do so.
    Kindly provide me the solution to this problem.
    Thanks
    Ankita

    Use RunningSum() function.
    Regards,
    Rohit

  • Row wise total in editable ALV

    hello all,
                I am workin on editable alv, the user need to enter the values in the editable fields and in the last column(non-editable) i need to populate the total row wise,as soon as user enters a value and goes to next editable cell or on entering a vale and press enter.how to accomplish this task...
    with regards,
    sandeep akella.
    Edited by: sandeep akella on Aug 20, 2009 1:58 PM

    You need to Implement the OnCellAction event.follow these steps;
    1. Goto WDDOMODIFYVIEW and place the following code
    IF first_time IS INITIAL.
        DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
        lo_cmp_usage =   wd_this->wd_cpuse_usg_alv( ).
        IF lo_cmp_usage->has_active_component( ) IS INITIAL.
          lo_cmp_usage->create_component( ).
        ENDIF.
        DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
        lo_interfacecontroller =   wd_this->wd_cpifc_usg_alv( ).
        DATA lo_value TYPE REF TO cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(
        CALL METHOD lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
         EXPORTING
            value = abap_true.
      ENDIF.
    2. Implement the onCellAction event as follows;
        Goto Methods tab, create a new method. Method Type- Event Handler , Event - ON_CELL_ACTION
    3. Now in this  method retrive the contents of the row and calculate the value as follows.
    DATA: l_element TYPE REF TO if_wd_context_element.
      DATA:ls_stru TYPE wd_this->element_cn_alv.
      DATA: l_node TYPE REF TO if_wd_context_node.
      l_node  = wd_context->get_child_node( 'CN_ALV' ).
      l_element = l_node->get_element(  r_param->index ).
      l_element->get_static_attributes( IMPORTING static_attributes = ls_stru ).
      ls_stru-last_col = ls_stru-col1+ls_stru-col2....+ ls_stru-col5. " add all the cells data
      l_element->set_static_attributes( exporting static_attributes = ls_stru ).

  • How to display the data in row wise in smartform

    Hi,
        I have to make a modification a smartform of poprinting and i want to display the row wise . At present it is displaying the  
        column wise. Actually there is a text which i want to display the data row wise.
        It is possible to display the data in row wise of the text .
    Edited by: nav009 on Oct 8, 2009 10:39 AM

    Hello ,
    I  assume that your requiremen is related to smartform.the below is the solution i suggest.
    As per my understanding of your requirement ,It's clear that as of now there is some description field which is also getting displayed along with other PO fields.
    However you would like to display the description field in a new line since the length of this field is longer than other fields as a result the data is getting scattered .
    Therefore one better option could be: since the whole data from PO would be in a loop you can display all other fields in one line type of the table as per the intial requirement and you display the description line alone in a new line type wth the desired length so that data would not be scattered and no data loss would happen.
    I assume you are aware of creating of line types for table.
    Thanks
    M.Naveen.

  • Use Session Variable with row-wise initialization

    Hello,
    I use an initialization block in order to load some translations in my repository (version is 11.1.1.6.BP1) :
    SQL :
    SELECT CODE_KEY, STRING_VALUE FROM "TABLES" WHERE  LANGUAGE_KEY= 'VALUEOF(NQ_SESSION.USERLOCALE)'
    Values :
    CN_INCOMING, Incoming, en
    CN_OUTGOING, Outgoing, en
    CN_INCOMING, Réception, fr
    CN_OUTGOING, Emission, fr
    etc ...
    I checked the row-wise intialization.
    The query is correct and returns the right values (I check in the log file ..).
    So far, So good.
    But when I want to use session variables in a column expression (in repository) like  :
    CASE WHEN "column"="xx" THEN VALUEOF(NQ_SESSION."CN_INCOMING")  ELSE VALUEOF(NQ_SESSION."CN_OUTGOING") END
    I got the error: [nQSError: 23006] The session variable, NQ_SESSION.CN_OUTGOING, has no value definition.
    If I used the same formula directly in Answers it's working correctly.
    Do I have to necessarily do this in answers or is there a way to do this in the repository.
    Thanks in advance
    Regards
    Benjamin

    Yes I already tested this point, when I don't use a row wise initialization it's working, but I don't want to create one variable for each translations that I need to use in column formula if you know what I mean.
    I don't understand why we can't use this kind of variable in this context ..but if I have to create the column in my analysis, I will do that, but it's not really user friendly
    Anyway thanks for your time.

  • Regarding Logical level key and row wise initialization

    Hi Gurus,
    What is the purpose of row wise initialization in external table authentication and when we have to go for row wise initialization.
    Why we have to enable logical level key in hierarchy is this only for getting drill down to the next level if we make two columns as logical level key what will happens. If we want to enable a column as a logical level key what are the character sticks that column should satisfy.
    Thanks,

    1) Row Wise Initialization used to hold multiple values in a variable. Let says SQL gives 4 rows (A,B,C,D) as output. Now I want to hold 4 value in a variable to get this happen we need to go for RowwiseIniziation. If you do not do this at any point in time Variable holds only value A not others. Simply it works as Array.
    2) Level keys define the unique elements in each level and provide the context for drill down. You can make two logical columns as logical key but you need to make sure what to be displayed in your hierarchy by selecting DISPLAY. If you make to as separate logical keys and set Display for both you get two columns in the hierarchy
    http://gerardnico.com/wiki/dat/obiee/hierarchy_level_based

  • How 2 Change of column wise o/p  to row wise output in ABAP?

    Hi all,
    I am getting the output in column wise as normally but how can I get the ouput in row wise.in ABAP.
    its urgent. can any one help me how to change the output layout?
    thanks in advance,
    Sakthi.C

    if it is normal report  .then
    go through the write  statents  . one of that is below 
    Loop at itab .
    write  : itab  .
    endloop.
    if it is  ALV  then you have to  define an internal table which are the fieldds  you  want palce in the  Row .
    so  that  
    data  c type  i value    '1'.
    loop at  itab .
    fieldcatalog-fieldname   = itab-field.
    fieldcatalog-col_pos     = c.
    append fieldcatalog to fieldcatalog.
    clear  fieldcatalog
    c = c + 1.
    endloop.
    so that  the Col_pos  will be increased  and the  Column data will be moved into Row .
    reward  points if it is usefull...
    Girish

  • Using row-wise multi-value GROUP system session variable in report filter

    The title says it all except I am using 10g OBIEE.
    What I want to do is filter on the dynamic system session variable GROUP created in a row-wise initialization block.
    The GROUP vriable is being set up correctly and it shows the user dynamically put into the correct groups in Answers.
    (Using the admin tool and looking at the user session, only the initial authentication block variables show up.)
    But if I want to filter using the value of GROUP it doesn't work.
    The obvious way is to choose the filter icon, then choose Add -> Variable -> Session, enter GROUP, and then display results.
    It comes back with no rows.
    Any idea how to do this? I've tried lots of things but none of them work either producing no rows or an error.
    This is the kind of Answers SQL this report is resulting in, which makes sense to me, but produces no rows.
    SELECT "Package Virtual Group (Dim)"."Package Virtual Group" saw_0, "Contact (Fact)"."Contacts All Count" saw_1 FROM "Case/Transaction/ABC" WHERE "Package Virtual Group (Dim)"."Package Virtual Group" = VALUEOF(NQ_SESSION."GROUP") ORDER BY saw_0

    866038 wrote:
    Errors come from trying things that don't work.
    For example, instead of =, using IN VALUEOF(NQ_SESSION.GROUP) or @{session.GROUP} or lots of other things.
    The question is this:
    how can I filter a column in Answers using the GROUP session variable which had been initialized in a row-wise initialization block?
    I can find no way to do it. Mostly it returns no rows.Hi,
    we had a similar requirement, where we have an external name that has project number values. We used row wise initialization to capture all the projects that a user belongs to. Then, we applied the filters at the RPD level, instead of doing it at the report level. From you requirement I see that you are trying to filter the groups based on user login. When a user logs in, he will see the information about the groups that he only belongs to. Correct me if I am wrong here.
    Assuming I am right about your requirement, providing the filter that you need apply in RPD.
    On all the fact tables are joined to the Package Virtual Group dimension, apply the below filter.
    case when 1=1 then (Dim)"."Package Virtual Group" END = VALUEOF(NQ_SESSION."GROUP");
    The reason for use of case statement here is, it converts the logical sql to IN Clause, helping us acheive the exact query that we would want.
    Please Award points if this helps.
    Thanks,
    -Amith.

  • In alvs how to do totals by colum wise and row wise

    hi,
    in alvs how to do totals by colum wise and row wise
    could u plz explain clearly with coding

    Hi Rajesh,
    Go through these links...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    Reward Points if this helps,
    Satish

  • Java.sql.SQLException: while calculating row count: Unexpected exception :

    I am working with JDBC that is connected to MS Access 2003 file.
    I wrote and tested in MS Access following query and all it is working well. If I write this query and execute it is working well.
    pstm = DBConnect.prepareStatement(
    "SELECT Parameter.Name, Parameter.id FROM " +
    "(ParameterGroupMember INNER JOIN ApplicationReadsParameter ON " +
    "ParameterGroupMember.Member_Parameter_id = ApplicationReadsParameter.Parameter_id)" +
    "INNER JOIN Parameter ON ApplicationReadsParameter.Parameter_id = Parameter.id " +
    "WHERE (ParameterGroupMember.Group_Parameter_id=40) " +
    "UNION ALL SELECT Parameter.Name, Parameter.id FROM " +
    "Parameter INNER JOIN ApplicationReadsParameter ON " +
    "ApplicationReadsParameter.Parameter_id=Parameter.id WHERE (Parameter.id=40); ");
    rs = pstm.executeQuery();
    When I use code, that sets parameters in the statement it is firing following exception
    java.sql.SQLException: while calculating row count: Unexpected exception : 1
    at sun.jdbc.odbc.JdbcOdbcResultSet.parameterQuery(JdbcOdbcResultSet.java:6417)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount(JdbcOdbcResultSet.java:6336)
    at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:155)
    at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:424)
    at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(JdbcOdbcPreparedStatement.java:93)
    pstm = DBConnect.prepareStatement(
    "SELECT Parameter.Name, Parameter.id FROM " +
    "(ParameterGroupMember INNER JOIN ApplicationReadsParameter ON " +
    "ParameterGroupMember.Member_Parameter_id = ApplicationReadsParameter.Parameter_id)" +
    "INNER JOIN Parameter ON ApplicationReadsParameter.Parameter_id = Parameter.id " +
    "WHERE (ParameterGroupMember.Group_Parameter_id=?) " +
    "UNION ALL SELECT Parameter.Name, Parameter.id FROM " +
    "Parameter INNER JOIN ApplicationReadsParameter ON " +
    "ApplicationReadsParameter.Parameter_id=Parameter.id WHERE (Parameter.id=?); ");
    pstm.setInt(1, 40);
    pstm.setInt(2, 40);
    rs = pstm.executeQuery();
    Further I found that the problem is with the setting of the second parameter in the statement. Is there different way how to set the second parameter if union is used?
    Thanks and regards,
    Jan

    Jan.Hv wrote:
    I am working with JDBC that is connected to MS Access 2003 file.
    Use code tags when you post code.
    I wrote and tested in MS Access following query and all it is working well. You mean it works in MS Access. Not that it works in java.
    >
    pstm = DBConnect.prepareStatement(
    "SELECT Parameter.Name, Parameter.id FROM " +
    "(ParameterGroupMember INNER JOIN ApplicationReadsParameter ON " +I STRONGLY suggest that rather than putting spaces at the end of each part put it at the beginning. It makes it much easier to get it right.
    I also suggest formatting the code. There are various ways.
            // Wrong
            String sql = "select x, y z "
                             + "from table1 t1, idtable idt"
                             + "where t1.tim=idt.tim "
                             +  "and t1.book = idt.book";
            // Right (spaces) - one way to format
            String sql = "select"
                             + "         x, y z"
                             + " from table1 t1, idtable idt"
                             + " where"
                             + "          t1.tim=idt.tim"
                             + "          and t1.book = idt.book";Your code is in fact missing a space. No idea if that is a problem or not.
    Remove the semicolon from the end.
    PRINT the sql before you use it, copy/paste and use that string in MS Access (replace the ?) to see if it work.
    Further I found that the problem is with the setting of the second parameter in the statement. Is there different way how to set the second parameter if union is used?The MS Access ODBC driver isn't really great for actually reporting errors correctly. So usually any error means something is wrong and it is up to you to figure out the exact problem.

  • Display result Cloumn wise to Row wise

    create table t(table_id number primary key, Grade_id number, Value number);
    insert into t values(1,77,11);
    insert into t values(2,77,12);
    insert into t values(3,77,13);
    insert into t values(4,88,14);
    insert into t values(5,88,15);
    insert into t values(6,88,16);
    insert into t values(7,99,17);
    insert into t values(8,99,18);
    insert into t values(9,99,19);
    commit;
    select * from t;
    TABLE_ID GRADE_ID VALUE
    1 77 11
    2 77 12
    3 77 13
    4 88 14
    5 88 15
    6 88 16
    7 99 17
    8 99 18
    9 99 19
    9 rows selected
    Question : I want my output ROW WISE
    for eg.
    TABLE_ID 1 2 3 4 5 6 7 8 9
    GRADE_ID 77 77 77 88 88 88 99 99 99
    VALUE 11 12 13 14 15 16 17 18 19
    Is this possible ?

    hi
    u can use this function to convert rows into cols
    CREATE OR REPLACE
    FUNCTION rowtocol( p_slct IN VARCHAR2,
    p_dlmtr IN VARCHAR2 DEFAULT ',' ) RETURN VARCHAR2
    IS
    TYPE c_refcur IS REF CURSOR;
    lc_str VARCHAR2(4000);
    lc_colval VARCHAR2(4000);
    c_dummy c_refcur;
    l number;
    BEGIN
    OPEN c_dummy FOR p_slct;
    LOOP
    FETCH c_dummy INTO lc_colval;
    EXIT WHEN c_dummy%NOTFOUND;
    lc_str := lc_str || p_dlmtr || lc_colval;
    END LOOP;
    CLOSE c_dummy;
    RETURN SUBSTR(lc_str,2);
    END rowtocol;
    rgds
    Ashish

  • Query in selecting row wise information

    Hello All,
    Could you please help me in getting the row wise information for the Financial Reporting Studion Report? I have a report where the row information will be Revenue and Expenses. but the revenue and expenses should only carry for specific cost centers. For example XXXXRevenue should carry revenue for GL Account XXXX.
    Iam not able to do this. Please help me.
    Thanks.

    Hi Geoff,
    You can use the ROW_NUMBER and CASE Functions to acheive this. Here with , i have give u a small idea with an ex:
    Qry :
    B.ItemCode,SUM(B.PO1)[PO1],SUM(B.POQty1)[POQty1],SUM(B.PO2)[PO2],SUM(B.POQty2)[POQty2] From
    select Itemcode
    CASE when Sno=1 Then DocNum End [PO1]
    CASE When Sno=1 Then Qty End [POQty1]
    CASE when Sno=2 Then DocNum End [PO2]
    CASE When Sno=2 Then Qty End [POQty2]
    From(
    Row_Number() Over (Order By Opor.Docnum) [Sno], Opor.DocNum,POr1.ItemCode,sum(POr1.Quantity)[Qty] from OPOR join Por1 on Opor.DocEntry=por1.DocEntry
    ItemCode='20002' group by oPor.DocNum,por1.ItemCode
    A where A.Sno<=2)B Group By B.ItemCode
    Result :-
    ItemCode  PO1         POQty1           PO2            POQty2
    20002       18            1.000000         19                10.000000
    Thanks,
    Karthikeyan.P

  • Auto calculation row, work around for mixed calc methods?

    I have a problem with an auto calculation row. One of the columns in the report is a percentage so I want the total row to calculate using a column formula, instead of the Auto Calculation Row calculation method setting.
    We're using the auto calculation row as a way to churn through many Entity members, displaying financial totals for 4 Account category groupings for each Entity member.
    For each Entity, those 4 rows display the data they're supposed to, and the auto calc row generates the 'Total', which is the calculation method it is set to do.  With 2 columns in play, it works like this:
    A1 through A4 display data, and are summarised in [A][Total Row]
    B1 through B4 display data, and are summarized in [B][Total Row]
    An updated requirement for a % column came up, and now we're trying to get that to display properly in column [C]. 
    [C] is created as a formula column
    The formula is set to [B]/[A], and formatted to display 0.01 precision
    We expect each row to use this formula, and for rows 1 through 4 it does.
    However, for [Total Row], it does not calculate [B]/[A]... instead it calculates [C][1]+[C][2]+[C][3]+[C][4]
    This makes sense in terms of what the 'auto calculation row' is designed to do, or as to how it is explained in FR documentation.
    The calculation method is set to 'Total', so it just adds up all of the data.
    But we're looking for a combination of settings or a work-around that permits the Auto Calculation row feature to be used with mixed calculations as I've described.
    We're on FR 11.1.2.362
    Thanks
    Troy

    gofer wrote:
    Hi osgood, thanks for getting back, thanks for that suggestion, I think that's a nice way of going about it. The form is working great with the calculation but I still can't get it to work on the reply email back to the site.
    This is what I've used in the PHP form;
    $freight = $_POST['PROD_freight_1'];
    $totalcost = ($chardonnay_2011_bottles * 20 + $chardonnay_2011_cases * 204) + ($pino_gris_2011_bottles * 21 + $pino_gris_2011_cases * 228) + ($sauvigon_blanc_2011_bottles * 20 + $sauvigon_blanc_2011_cases * 204) + ($riesling_2012_bottles * 20 + $riesling_2012_cases * 204) + ($pinot_noir_2009_bottles * 25 + $pinot_noir_2009_cases * 250) + ($PROD_freight_1);
    This the code for the reply back to the site;
      \n selection \n $PROD_freight_1
    Cheers
    The variable should be:
    + ($freight);
    and
      \n selection \n $freight
    Does that work?

  • Easy Cost Planning: Calculation Row (Business Process) in Cost Model Derivation Rule

    Hi All,
    The Requirement:
    Using the Cost Model I am able to do up to Sub-Total Value.  I tried with Calculation Row (Business Process) in the Cost Model Derivation Rule, but could not succeed. 
    I tried with Base Planning Object, but the formulas are different for other scenarios.  Which require 5 to 6 Base Planning Objects are required to be created to get the total amount for a single line item, in the construction project there will be more than 10,000 line items and it is very difficult to maintain the data and also it is time consuming.
    Can you suggest me, how to map the requirement?
    Best Regards,
    K. Rajendra Prasad Rao

    You need to check the following for the material cost to appear in network costing:
    1. Check whether costing variant is assigned to the network or not.
    2. Check whether costing relevancy indicator is checked in material component assigned to the network.
    3.  If costing variant exists, check the valuation variant and strategy sequence for material valuation.
    4. Go to the material master and see whether price is mentioned  or not.
    I would suggest you to use Network costing, Also note network costing are recorded in Co version '0' so if you have maintained your ECP for '0' version, there is a chance of both the costing getting added up.
    Edited by: Ahmed Rifaee on Mar 28, 2010 10:10 PM

  • Row-Wise Variable not populating in Filter

    Hi,
    I have a row-wise variable that gets a list of units that an employee belongs to (parent/child units).
    In answers, I want a prompt with a drop down that shows all of the units the user should be able to access. This works if the user only belongs to one unit. However, if a user is in multiple units, it only shows his "Current" unit in the drop down (just one value).
    My prompt query is like this:
    SELECT "- Dim_Emp".unit FROM PRS WHERE "- Dim_Emp".unit = VALUEOF(NQ_SESSION.Units)
    From what I understand, the where equals clause should evaluate to a where IN clause in the physical statement, but it doesn't appear to be doing that.
    I would really appreciate some help on this. Thanks!
    Kevin

    Kevin,
    In prompts, the drop-down can only contain 1 value. You should use the multi-select option in prompt.
    Try that and see if you get a list of all parent/child units

Maybe you are looking for

  • Problem Installing Business Objects XI 3.1 SP2 on AIX 5.3

    Hi, We installed Business Objects XI 3.1 first on AIX 5.3  and everything worked fine. Once we apply BO XI 3.1 SP2 patch (by running the install.sh script from the BO XI 3.1 SP2 install bits) onto the Business Objects XI 3.1instance, the following er

  • What is the best way to find a file on the servers disk without using web.xml?

              What is the best way to find a file on the servers disk without using web.xml?           I want to find a configuration file not contained within the war file I have           created. Is there a way to pass information into the ServletCont

  • (internal) Tables obsolete as parameter in function modules in ECC 6.0

    Hi All, I followed Steps 1 and 2 in the thread  but when I use the following select statement I get a dump with the error enclosed. Step1. Created a structure ZDFKKCOHI which is a replica of DFKKCOHI. Step2. Created a table type ZDFKKCOHITABLE with l

  • Live cache DBM access

    Hi Experts If I stop Livecache in LC10, only SQL access is coming down but DBM access is not totally. Though I can see the message "Live cache is successfully stopped". How to bring down the DBM access along with SQL access for LC 7.9 I would appreci

  • Installation of Photoshop CS6 (Extended) on Case-Sensitive Drives

    I understand that under the "system requirements" the Adobe website says that you can't install PS CS6 (Extended) on case-sensitive drives (I'm using a MacBook Pro, OS X v. 10.7.4).  This seems to have been the case at least since CS5. I didn't see t