Row wise Sum

How to Calculate the row wise sum in pivot table to get the total value
Product AAA BBB CCC Total
Printer 23 35 11 69
Book 2 4 3 9
Regards

792011 wrote:
Kranthi,
I already did those steps. I am able to see only the total if there are values for three rows. Here is the example. The report show show even there any no value in one of the rows
Product AAA BBB CCC Total
Printer 23 35 11 69
Book 2 4 3 9
Pencil 5 200 205
Pen 159 159
Bottle -30 -30
Appreicate Your Help
RegardsI'm going to take a shot and guess that you meant a total shows up only if there are values for each column. I am further going to guess that the example you gave is what you'd like to see, not what is actually going on. If so, then you need to modify your measure like this:
IFNULL(measurecolumn, 0)
Then you will get a sum even if one of you columns is null.

Similar Messages

  • 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

  • Row wise running total

    is there any method to create row wise running total in Crystal Reports?

    >
    gourav.sengupta wrote:
    > Hi,
    >
    > I needed a running total but for rows. Therefore if the data set is in the following manner:
    >
    > Column 1             Column 2             Column 3             Column 4
    > A                         12                       13                       14
    > B                         11                       10                       19
    >
    > The the running total will appear as:
    > RT                        23                       23                       33
    >
    >
    > Thanks and Regards,
    > Gourav
    I am confused as to what you want.
    Your sample shows sums for collumns, not rows. You do not need a running total for this, just sum them.
    If you want to total each row, make a formula that adds them up and place on the row.

  • 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

  • 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

  • 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

  • How to display 7 values of  single field in row wise.

    hi,
    how to display 7 values of  single field in row wise.
    thankx in advance.

    hi ,
    do it like this :
    1 Place ur UI element in tranparent container with Layout as Row Data and Layout Data as Row Head Data
    2 Ur first  UI , which contains the first value as Row Head Data ,
    3 Others as Row Data
    u can do it with Matrix Data as well
    if u want to give space , u can use HORIZONTAL GUTTER and set its width to medium / large / Xlarge
    also there is a UI element "INVISIBLE ELEMENT" ,
    1 u can use this UI element to provide space between ur other UI elements in the view
    2 u can insert a text element as well , and in the Text property of the element press ALT + 0160.
    u can give the space bw UIs as desired.
    regards,
    amit

  • Use row wise session variable in IN CLAUSE

    Hi,
    I' have a question. Suppose I have a row wise session variable named Users setted in an initialization block with following SQL query:
    SELECT 'NAMES', names from NAMES_TABLE where GROUP='Administrators'
    Suppose it returns value list 'JOHN, MARIE'.
    Can I set another row wise session variable named COUNTRY in initialization block with following SQL query:
    SELECT 'COUNTRY', country from COUNTRY_TABLE where names IN (VALUEOF(NQ_SESSION.Users))?
    so that COUNTRY variable returns for example list 'CANADA','OHIO'?
    or OBIEE returns error?
    If it's not possible can you give me a solution?
    Thanks

    Hi,
    I've resolved, but now I have another problem.
    I have a row-wise session variable called COMPANY_FILTER
    In Dashboard Prompt "Show" Section I have following query:
    SELECT Country."Company Description" from Prototype where Country."ID" = VALUEOF(NQ_SESSION.COMPANY_FILTER).
    When COMPANY_FILTER has at least one value it works fine. But COMPANY_FILTER can be even empty.
    In the latter case query fails.
    Now, when COMPANY_FILTER is null I must execute following query:
    SELECT Country."Company Description" from Prototype
    otherwise when it is filled i must execute following query:
    SELECT Country."Company Description" from Prototype where Country."ID" = VALUEOF(NQ_SESSION.COMPANY_FILTER).
    I have tried with CASE WHEN, but i don't know the exact syntax. Can you suggest me a correct query for my goals?
    Thanks

  • Row wise init block has no value defination.

    Hi Experts,
    I ahve requirement where i need to pick the department of loged in users in dashboard prompt.
    So I created the session variable with row wise and written the query:
    SELECT DISTINCT 'Department', Department_Name FROM tableA WHERE A.LOGIN_ID= ':USER'
    But I get this error in answers:
    The session variable, NQ_SESSION.Department, has no value definitions

    Thanks for your help !
    I created a session variable UNAME
    SELECT 'VALUEOF(NQ_SESSION.USER)' FROM DUAL
    Then I created the second variable with row wise init block.
    SELECT DISTINCT 'Department', Department_name FROM Department A WHERE A.LOGIN_ID= 'VALUEOF(NQ_SESSION.UNAME)'
    in second init block i.e. for department i added the init block(Uname) in execute precedence.
    Still I am getting the same issue..any help pls?
    Thanks.

Maybe you are looking for

  • MEIS - MEssage 'No data selected' after changes in VEFU

    Dear Gurus, While doing the Intrastat reporting, we have the Statistical value as 0 in some of the documents. The client's requirement is to populate a value in this field. So, they are trying to use the Transaction VEFU to insert a statistical value

  • SQL Table Link between invoice and profit centre

    Hi, We are about to bulk import reserve invoices but I just need to allocate an invoice against the correct profit centre. Where is the link between sql tables? Edited by: Ricky Thomas on Mar 17, 2011 5:15 PM

  • TS3430 My iTunes keeps shutting down every time I try to play video. Even in safe mode.

    iTunes stops working and turns off every time I click on one of my downloaded videos. For years I have had no problems, now all of a sudden I am having this problem. It seems to be connected to the last update I got. Maybe it is connected to some plu

  • Configured Characterstics Report

    Hi We use Variant configuration and its corresponding material been explored in the project . Need an report based on the project to get the characterstics report. Tried using function module -VC_I_GET_CONFIGURATION but this one gets all the values r

  • Installer does not see hard drive, how do I mount

    Initialized Hard Drive with current volume and as mac extended and zero'd out memory. This drive came out of a PC that had been out of whack and drive was partitioned wrong in the PC. It worked fine to load mac OS 9.2.2 and has 18 gigs free. When I b