Total based on selected rows

Hi,
I have a column called record type and I would like to sub-total based on
selected rows from the record type at the bottom. how do I do it ?
for ex:
rtype load
s - 100
b - 150
r - 200
z - 10
total load1 b+r - 350
total load2 b+z - 160
------------------------------------------

You can use calculations in pivot tables to operate with distinct values of a column. You can create a new column (or row) as 'b' + 'r' record types. You can select wether to see original and total columns or only totals.
See 'Examples of Calculations in Oracle BI Pivot Tables' section in "Oracle® Business Intelligence Answers, Delivers, and Interactive Dashboards User Guide" document.

Similar Messages

  • How to variable exit read table based on selected row on weblayout ??

    Hi All,
    Greeting,
    I have a question regarding IP.
    I have report where I can choose the line. I've already been able to catch the selected row there using ABAP Planning Function.
    The requirement is to change some value from other customized table ( not info cube ) based on selected row.
    So when user's selecting data and pressing a button, the idea is to prompt a variable where they can see the old value, and they can entry the new value. But to query that value, I need to select based on the values the row.
    My Question is how user-exit in variable can read selected row in web planning layout especially it happens when I_step = 1 ?
    Or the other idea is to get the value on that customized table and put it in text web item as the old value. How can I fetch data from table and put it in text web item ?
    Thanks a lot and have a good day,

    Hi.
    My Question is how user-exit in variable can read selected row in web planning layout especially it happens when I_step = 1 ?
    I think there is no way to do it. I_STEP=1 called before the report shows the data.
    But may be the next approach could help you:
    1. when you select line you can use command for populating variables according to selected line. let's say yohave selected line with costcenterr XXX so you can populate variable (let's say Z_CC) with selected value.
    2. create FOX that reads variable Z_CC value and calls any function module with customized table and variable value (you can use CALL FUNCTION statement within FOX and pass to it variable value).
    This is just an idea of some direction - may be you can take it and develope to required result.
    Regards.

  • How to show/hide total based on selected column in column selector

    Hello,
    Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
    Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
    Default:
    Count
    East 10
    West 20
    Total 30
    Gender:
    Male Female Total
    Count Count Count
    East 6 4 10
    West 14 6 20
    Total 20 10 30
    Any thoughts?
    Thanks!

    I recommend using view selector instead of column selector

  • Pop up based on selected rows

    Hi,
    I have a multi-row select report with checkboxes. I would like to have it so you can check off your desired rows and click a button to have another window popup with the row information displayed in a different layout. The reason I am doing this is because I want to print specific rows (3 at a time, actually) in a particular format (ie not horizontally). I can get this to work with static fields in the region but cannot make the leap to multi-row select.
    I'm thinking it's a combination of passing htmldb_application.g_f01 to pick the checked rows and then have javascript loop through the values in the report and place them in fields on the pop up. I found other postings, but they were for update of the multiple rows: I'm looking to just copy the text from the rows themselves to another window.
    Is this possible?
    I want a specific format to print out data in non-row fashion for a select set of data.
    Does this make sense?
    Thank you,
    Dean

    I believe I was getting caught up because I was trying to mix server side and client side functions.
    I ended up doing two things slightly different.
    Created a new small table to house my selections:my_print.
    I had check boxes on the rows and an after submit process that would delete the rows in the selection table and insert the key values of those selected.
    BEGIN
    DELETE from MY_PRINT;
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    INSERT INTO MY_PRINT (CARD_ID) VALUES (HTMLDB_APPLICATION.G_F01(i));
    END LOOP;
    END;
    Then when I added a Submit "Print" button that took you to another page. That page was a print-friendly formatted report which selected the rows off the my_print keys. To get the format I ended up modifying the report template behind the page. This required a little trial and error with the different template types but I got what I wanted with a vertical named template and custom HTML tagging on the Row Template to build the page like a table.
    It's all server side now and loads within the page, rather than a pop-up.
    It accomplished the ultimate goal of being able to print selected rows in a format I liked. Plus, doing it this way was way easier than trying to code it all with a pop-up.
    good luck
    dean

  • IRecruitment - custom page based on selected row in advanced table

    HI,
    We are implementing an addition to iRec. From the vacancy search page I have added an extra image column called worklog to the advanced table. Within the attributes I have set the view instance and and view attribute to
    View Attribute VacancyId
    View Instance IrcVacancyVO
    However this value does not get passed across. I have even called the image ID VacancyId in the hope that this value pair would be posted to the custom app I have written.
    I know this is a pretty low tech question on here, but does anyone know how I can pass the id of the selected row acroos to my custom page?
    TIA,
    Simon

    Hi Simon,
    In OATables we can not get the handle of current row.
    The alternate solution is to call an AM method, execute the method and get the value from the VO row. Return it back to CO and then you can call your new page from the Search page in iREC.
    it should work. Let me know if you are facing any problem.
    Thanks
    Anoop

  • Totals Based on Multiple Criteria in Repeating Rows

    Hi All,
    I have 3 dropdowns (DD1, DD2, DD3) and one textfield (TF1) in repeating rows (not in a table).  Each dropdown has two choices and the textfield is free-form. Outside of the rows (in a different subform) I want totals based on multiple criteria from the dropdowns and textfields.
    The following script works great to get a total number of one choice from one dropdown.
    this.rawValue = xfa.resolveNodes('form1.Form.row[*].DD1.[$.rawValue == "2"]').length;
    Problem is how do I calculate the totals for the following based on the criteria listed in each row.
    Find the totals for ML
    Number of New Forms 1-2 Pages: (result should be 2)
    Number of New Forms 3+ Pages: (result should be 1)
    Number of Revised Form: (result should be 0)
    In row #1:  select “New” as a choice from DD1, “Form” as choice from DD2, “ML” as a choice from DD3 and enter “5” in TF1.
    In row #2:  select “New” as a choice from DD1, “Form” as choice from DD2 , “ML” as a choice from DD3 and enter “1” in TF1.
    In row #3:  select “New” as a choice from DD1, “Form” as choice from DD2, “ML” as a choice from DD3 and enter “2” in TF1.
    In row #4:  select “Revised” as a choice from DD1, “Series” as choice from DD2, “ML” as a choice from DD3 and enter “1” in TF1.
    In row #5:  select “New” as a choice from DD1, “Form” as choice from DD2, “PM” as a choice from DD3 and enter “1” in TF1.

    Try something like;
    var mlNewForms1or2Pages = 0;
    var mlNewFormsOver3Pages = 0;
    var mlRevisedForms = 0;
    var rows = xfa.resolveNodes('form1.Form.row[*]');
    for (var i = 0, limit = rows.length; i < limit; i++)
    var currentRow = rows.item(i);
    if (currentRow.DD1.rawValue == "1") // new
      if (currentRow.DD2.rawValue == "1") // form
       if (currentRow.DD3.rawValue == "1") // ML
        if (parseInt(currentRow.TF1.rawValue, 10) > 2)
         mlNewFormsOver3Pages++;
        else
         mlNewForms1or2Pages++;
    else // revised
      if (currentRow.DD2.rawValue == "1") // form
       if (currentRow.DD3.rawValue == "1") // ML
        mlRevisedForms++
    console.println(mlNewForms1or2Pages);
    console.println(mlNewFormsOver3Pages);
    console.println(mlRevisedForms);
    To do the same using predicates you could do;
    var mlNewForms1or2Pages = 0;
    var mlNewFormsOver3Pages = 0;
    var mlRevisedForms = 0;
    mlNewForms1or2Pages = xfa.resolveNodes('form1.Form.row.[DD1 == 1 and DD2 == 1 and DD3 == 1 and TF1 <= 2]').length;
    mlNewFormsOver3Pages = xfa.resolveNodes('form1.Form.row.[DD1 == 1 and DD2 == 1 and DD3 == 1 and TF1 > 2]').length;
    mlRevisedForms = xfa.resolveNodes('form1.Form.row.[DD1 == 2 and DD2 == 1 and DD3 == 1]').length;
    But if you wanted totals for all the permutations then this could become slow.
    Regards
    Bruce

  • How to get selected Row Index in a table based ona  VO?

    Hi All,
    I'm writing an ADF form wherein I use a VO based on a SQL query. I'd like to know how to get the index of a selected row. I havea selection Listener in place where I can print the selected Row's data using getSelectedRowData().toString() on the table.
    How can I get certain Attributes from this selected row.
    One solution I thought of is to get the row index and then read attributes. But I cant seem to figure out how to get rowIndex for a selected row. Any sugestions?
    Using JDeveloper 11g.
    Thanks
    P.

    If your selected row is marked as current row you can use
    // Get a attribute value of the current row of iterator
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("testIterator");
    String attribute = (String)iterBind.getCurrentRow().getAttribute("field1");Where 'testIterator' is the name of the iterator you use for the table and 'field1' is the name of an attribute you want to get.
    Or you can iterate over the selected row keys (even if it's only one):
    // get  selected Rows of a table 2
    for (Object facesRowKey : table.getSelectedRowKeys()) {
    table.setRowKey(facesRowKey);
    Object o = table.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
    Row row = rowData.getRow();
    TestRow testRow = (TestRow)((DCDataRow)row).getDataProvider() ;
    }Where TestRow is the row type of the VO of your table.
    Timo

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Textview with totals based on dynamic ALV selections

    Hi all, it´s me again, suffering like a mother with my first WDA serious application
    I have this ALV with a prices column, with an editable checkbox field, and what my client wants is a field on the screen (I think it must be a Textview) that displays the total sum of all selected rows in the ALV. Of course, this sum must be dynamic, according with the actual selection.
    Could anyone tell what should I do?
    Thanks a lot, best regards.
    Federico Alvarez

    Hi Fedrico,
    Seeing your problem, You hv to write the logic on the ON_DATA_CHECK event of the alv grid.
    I am giving you a sample code that might helps you.
    METHOD on_data_check .
    Data declaration for assigning the contract,total and balance(remaining) amount
      DATA : lo_nd_contract_payment TYPE REF TO if_wd_context_node,
             lo_el_contract_payment TYPE REF TO if_wd_context_element,
             ls_contract_payment    TYPE wd_this->element_contract_payment,
             lv_contract_amount     LIKE ls_contract_payment-contract_amount,
             lv_value_date          LIKE ls_contract_payment-value_date.
       Data Declaration
      DATA : lo_nd_payment_table    TYPE REF TO if_wd_context_node,
             lo_el_payment_table    TYPE REF TO if_wd_context_element,
             ls_payment_table       TYPE wd_this->element_payment_table,
             lt_payment_table       LIKE TABLE OF ls_payment_table,
             lv_total_amount        LIKE ls_payment_table-amount,
             lv_balance_amount      LIKE ls_payment_table-amount,
             lv_paymeth             LIKE ls_payment_table-payment_method,
             lt_paycreate           TYPE TABLE OF /dmpui/db_str_paycreate,
             ls_paycreate           TYPE /dmpui/db_str_paycreate.
      Data declartion for message manager
      DATA : lo_api_controller     TYPE REF TO if_wd_controller,
             lo_message_manager    TYPE REF TO if_wd_message_manager.
      get message manager
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
      navigate from <CONTEXT> to <PAYMENT_TABLE> via lead selection
      lo_nd_payment_table = wd_context->get_child_node( name = wd_this->wdctx_payment_table ).
    check for data error in the grid
      CHECK r_param->t_error_cells IS INITIAL.
      IF lo_nd_payment_table IS NOT INITIAL.
      get all declared attrigbutes
        lo_nd_payment_table->get_static_attributes_table(
          IMPORTING
            table = lt_payment_table ).
      ENDIF.
      lo_el_payment_table = lo_nd_payment_table->get_element( ).
      lo_el_payment_table->get_attribute(
      EXPORTING
          name =  `PAYMENT_METHOD`
       IMPORTING
          value = lv_paymeth ).
      lv_total_amount = 0.
      wd_assist->gc_total_amount = 0.
      IF lt_payment_table[] IS NOT INITIAL.
    Looping at the payment internal table*
        LOOP AT lt_payment_table INTO ls_payment_table.
            lv_total_amount = lv_total_amount + ls_payment_table-amount.
          ENDIF.
          CLEAR ls_payment_table.
        ENDLOOP.
      ENDIF.
    Passing the Total Amount Value to the Assistance class variable
      wd_assist->gc_total_amount = lv_total_amount.
    navigate from <CONTEXT> to <CONTRACT_PAYMENT> via lead selection
      lo_nd_contract_payment = wd_context->get_child_node( name = wd_this->wdctx_contract_payment ).
    get element via lead selection
      lo_el_contract_payment = lo_nd_contract_payment->get_element(  ).
      lo_el_contract_payment->get_attribute(
        EXPORTING
          name =  `CONTRACT_AMOUNT`
       IMPORTING
          value = lv_contract_amount ).
    Calculating the balance amount
      lv_balance_amount = lv_contract_amount -  wd_assist->gc_total_amount.
    get single attribute
      lo_el_contract_payment->set_attribute(
        EXPORTING
          name =  `TOTAL_AMOUNT`
          value = wd_assist->gc_total_amount ).
      lo_el_contract_payment->set_attribute(
          EXPORTING
            name =  `BALANCE_AMOUNT`
            value = lv_balance_amount ).
    Binding the data to the context node
      lo_nd_payment_table->bind_table(
        EXPORTING
          new_items            = lt_payment_table   " List of Elements or Model Data
          set_initial_elements = abap_true          " If TRUE, Set Initial Elements Otherwise Add
    ENDMETHOD.
    Regards
    Manoj Kumar
    Edited by: Manoj Kumar on Feb 27, 2009 10:25 AM

  • Select rows based on condition of same row

    Hello,
    I have the following table structure and rows defind here
    http://sqlfiddle.com/#!4/3f474/3
    I would like to select rows if PRODUCT_NO is null then I need to select rows which are having IS_PAYABLE='Y'. If PRODUCT_NO is not null
    then IS_PAYABLE will be 'N' or IS_PAYABLE will be null.
    E.g.
    For PRODUCT_REG HPO_FABRIC, one PRODUCT_NO null so I need select that row only, not the other two rows.
    I can do
    select * from SUPPLIER_DETAILS where  IS_PAYABLE='Y', but what if there are many records with PRODUCT_NO having null or not null
    How can I do this using sql?

    This simple query!!!
    select *
      from supplier_details
    where (product_no is null
        and is_payable = 'Y')
       or (product_no is not null and is_payable is null);
    PRODUCT_REG                                                                                          PRODUCT_SUPPLIER_CODE PRODUCT_NO START_DATE                END_DATE                  IS_PAYABLE
    HPO_FABRIC                                                                                           JP_008                           01-AUG-01                 31-AUG-01                 Y         
    HPO_FABRIC                                                                                           JP_008                STGA-FABR1 16-AUG-01                 31-AUG-01                            --Edited:- Modified Query and Results for 2nd Requirement
    Edited by: Purvesh K on Sep 17, 2012 4:55 PM
    --Removed NVL
    Edited by: Purvesh K on Sep 17, 2012 5:04 PM

  • Filter List ViewA based on List ViewB selected row?

    Hello,
    I am trying to find out if it is possible to transfer the ID of a selected row in one view of a list, and use that to filter a second view of the same list.
    Supposedly, this can be done if this page is any proof:
    http://msdn.microsoft.com/en-us/library/dd585662(v=office.11).aspx.
    But I haven't been able to find any informative tutorials or walkthroughs other than webpart connectors on the same page.

    Just connect the two web parts together and have the first web part send the ID to the second.  Take a look at the following walkthrough.  Its for 2007 but should still work essentially the same.
    https://www.nothingbutsharepoint.com/sites/eusp/pages/sharepoint-filtering-with-web-part-connections.aspx
    To do this using two separate pages you need to do it using SharePoint Designer.  I haven't tried it lately and am not sure its still possible since the Design view as removed.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Change Totals based on Checkbox  in ALV Grid

    Hi,
    My report is having 5 Columns with 50 records as Output.
    First :Check box.
    Second : Inbound Delivery Number.
    Third : Carton Id
    Fourth: Weight
    Fifth : Volume.
    User can select/ deselect the records using Check box. I am writing this logic under Hot spot event.
    I need to calculate sum of Weight and Volume for the records which user selects using Check box and 
    display it Total Weight and Total Volume.
    How can i change the Totals in Top_of_page at run time based on user selection? Please suggest..
    Thanks
    Bhuvana

    Hi,
    Instead you could have one "Sum" button on application toolbar and if user selects the number of rows and clicks on that button, then you can sum up the selected rows and show (WRITE command at TOP_OF_PAGE event) it in screen.
    Try it!
    Regards
    Sarav

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • Get selected row from grid

    Hi
    I use JDev 11.1 with ADF, i have grid, i need to get selected row of grid when i press buttom, how can i do that?
    Thanks

    Hi,
    You have a table in your page that is based on a viewObject iterator and you need to get the selected row in your backing bean when you click on a button.
    Did I get this right?
    If so then you need to add an actionListener on this button that executes a method in the backing bean.
    the button code:
    <af:commandButton text="commandButton 1" id="cb1"
                                        actionListener="#{myBean.buttonActionListener}"/>In this method you need to add code like this:
      public void buttonActionListener(ActionEvent actionEvent) {
        BindingContext bindingctx=BindingContext.getCurrent();
        DCBindingContainer bindings=(DCBindingContainer)bindingctx;
        DCIteratorBinding iter= bindings.findIteratorBinding("iteratorName");
        Row currentRow=iter.getCurrentRow();
      }If this is not what you need give some more details.
    Gabriel

  • How to get selected row from a non-bind ADF table

    Hi,
    I have an ADF table that is based on a collectionModel built programmatically. The collectionModel is this:
    model = new SortableModel(new ArrayList<ArrayList>());
    Hence, it is not a binding table. My question is how to get the selectedRows from a non-bind table.
    I am used to building binding ADF table and I know we can get it from voiterator.getCurrentRow, since the selectionListener is set to the binding....collectionModel.makeCurrent
    <af:table value="#{bindings.ItasLookupTypesVO1.collectionModel}"
    selectedRowKeys="#{bindings.ItasLookupTypesVO1.collectionModel.selectedRow}"
    selectionListener="#{bindings.ItasLookupTypesVO1.collectionModel.makeCurrent}"
    </af:table>
    I am thinking maybe I need to write my own selectionListener, but need more advice/ideas of what's the codes in the customer selection Listener to get it from my SortableModel.
    Please help.
    Thanks
    -Mina

    I'm not sure if this works in your case, but check out the selection listener I write in this blog http://wp.me/pcBZk-eu
    You should use the selection event and check the added set. This should give you access to the selected row.
    Timo

Maybe you are looking for

  • Billing doc - control field to post values to accounting

    IN PROFORMA INVOICE THE VALUES WILL NOT BE POSTED TO ACCOUNTING WHEREAS IN STANDARD BILLING DOC F1 AND F2 VALUES WILL BE POSTED WHERE IS THE CONTROL KEY FOR THIS THANKS

  • Dunning Print Error: F150_DUNN_01 does not exist

    Hi, I have assigned F150_DUNN_01 via FBMP T-code for Dunning texts. While performing the Dunning print I am getting an error "Text object does not exist" or F150_DUNN_01" does not exist. The Event settings via T-code BF31 for event 1720 is "FI_PRINT_

  • Help? Satellite M645 Overheatin​g

    Hey guys!       I'm a Toshiba user from Brazil, and I have a little problem (by the way, can become a very big problem i think) and maybe u guys can help me, my notebook its overheating, i got no shutdown's BUT the heat its very high i don't monitor

  • Movie file on photo gallery page

    I added a small movie file to the bottom on a photo gallery page. That works out fine, but then the same movie displays at the bottom of each page when individual images are displayed, which I don't want. I know that it's all one page under the hood.

  • What is the popping/clicking sound in my voice recordings?

    Hi All! I just used my italk pro with the new 8gb nano. I recorded a lecture today, and when i played it back there are clicking/popping sounds every few seconds in my recording. i have used this italk also with my 80gb ipod (which was stolen by one