Addition across rows & columns

Hi all,
I am new to Business Objects so please bear with me. I am using a cross tab in Web intelligence.
I want to compute sum across rows & columns & divide the cells with this sum. foreg.
       interval1           interval2
       Count                Count             Sum
A     1                     3                       4
B     2                    3                        5
Sum 3                      6        
Now I want to first obtain sum across column & rows. and then divide cells in interval1 with 3 & in interval2 with 6
Thanks in advance.

Hi srrachna ,
Thanks for reply.
Actually the issue is -:
This the input data
1. Hour interval
2.  Count
3. Item
Now on Cross Tab the data is arranged as follow -:
Business Magzines                                                                                4                      3                   6
% of Business Magzine
Literature                                                                                5                       3                  1
% of Literature Books
Now the purpose is calculate sum across row & column . Use this sum to calculate %.
Now Count gives distribution in specific intervals.
I need to have total . Let's say of first column i.e. 9.
Use this SUM(9) & calculate % of particular product.---->  % of Business Magzines     (4/9) *100
                                                                                % of Literature     books  (5/9)*100 
Items may change depending on the data entered i.e. it may grow more than these two items or reduce.
Edited by: sorav84 on Feb 10, 2012 3:57 PM

Similar Messages

  • BEx Query - Condition Across Row & column

    Hello Experts,
    For a query i'm giving a condition based on 2 characteristics which is at the row. When it is drilled across week at the column, it is not working proper. But when i have week at the row itself, it is working fine. Kindly help me out in having week at the column level and still be able to apply the condition.
    Regards
    Sam

    Hi Triple,
    Thatz rite. I tried the fourth option. That is working fine only when i have Week also in the row along with other 2 characteristics in the row. If i pull the week to the column, that is not working fine.
    Regards
    Sam

  • Dragging one cell value(copy) across columns or across rows in ALV layout

    Hi friends,
    In bps layouts, data is displayed in ALV grid as interface. At plng folder level, can i incorporate excel feature like dragging one cell value across columns or across rows?  Simply if user enter one value in cell of ALV grid, that should be copied automatically across rows/columns while dragging?
    Second question, even i chose in layout builder excel as interface, that layout showed in plng folder as ALV grid layout. Why it happens so. I read documentation in UPSPM of that particular plng folder, it tells same thing(even if u choose excel, it will show in ALV only). So how can i get excel interface in plng folder?
    Regards,
    Kumar

    requested property is not possible at ALV layout level. Provided text document load facility to user. So user can directly load excel to plng folder.
    Issue resolved.

  • Across row validation in tabular form and across items in row validations.

    Hi,
    We are upgrading to APEX 4.0.
    I need to create a tabular form that will have a start date and an end date. FOr each new row or updated row I need ensure its start date is after the end date of all rows already entered and its end date is after the start date of row being entered. Also that if no end date is entered then no other rows can be found with a null end date.
    SO I need across field validations with in a row and across row validattions. That is I need rowset validations as well.
    Is it possible to do this with APEX? WHat kind of tabular solution would allow these type of validations. How might these validations be done?

    Okay, Here's a quick rundown on how to build a manual form using APEX_ITEM and collections. The process goes in 4 steps: gather the data, display the data, update based on user input, then write the changes. Each step requires it's own piece of code, but you can extend this out as far as you want. I have a complex form that has no less than a master table and 4 children I write to based on user input, so this can get as complex as you need. Let me know if anything doesn't make sense.
    First, create the basic dataset you are going to work with. This usually includes existing data + empty rows for input. Create a Procedure that fires BEFORE HEADER or AFTER HEADER but definitely BEFORE the first region.
    DECLARE
      v_id     NUMBER;
      var1     NUMBER;
      var2     NUMBER;
      var3     VARCHAR2(10);
      var4     VARCHAR2(8);
      cursor c_prepop is
      select KEY, col1, col2, col3, to_char(col4,'MMDDYYYY')
        from table1
        where ...;
      i         NUMBER;
      cntr      NUMBER := 5;  --sets the number of blank rows
    BEGIN
      OPEN c_prepop;
        LOOP
          FETCH c_prepop into v_id, var1, var2, var3, var4;
          EXIT WHEN c_prepop%NOTFOUND;
            APEX_COLLECTION.ADD_MEMBER(
            p_collection_name => 'MY_COLLECTION',
            p_c001 => v_id,  --Primary Key
            p_c002 => var1, --Number placeholder
            p_c003 => var2, --Number placeholder
            p_c004 => var3, --text placeholder
            p_c005 => var4 --Date placeholder
        END LOOP;
      CLOSE c_prepop;
      for i in 1..cntr loop
        APEX_COLLECTION.ADD_MEMBER(
            p_collection_name => 'MY_COLLECTION',
            p_c001 => 0, --designates this as a new record
            p_c002 => 0, --Number placeholder
            p_c003 => 0, --Number placeholder
            p_c004 => NULL, --text placeholder
            p_c005 => to_char(SYSDATE,'MMDDYYYY') --Date placeholder
      end loop;
    END;Now I have a collection populated with rows I can use. In this example I have 2 NUMBERS, a TEXT value, and a DATE value stored as text. Collections can't store DATE datatypes, so you have to cast it to text and play with it that way. The reason is because the user is going to see and manipulate text - not a DATE datatype.
    Now build the form/report region so your users can see/manipulate the data. Here is a sample query:
    SELECT rownum, apex_item.hidden(1, c001),  --Key ID
         apex_item.text(2, c002, 8, 8) VALUE1,
         apex_item.text(3, c003, 3, 3) VALUE2,
         apex_item.text(4, c004, 8, 8) VALUE3,
         apex_item.date_popup(5, null,c005,'MMDDYYYY',10,10) MY_DATE
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MY_COLLECTION'This will be a report just like an SQL report - you're just pulling the data from the collection. You can still apply the nice formatting, naming, sorting, etc. of a standard report. In the report the user will have 3 "text" values and one Date with Date Picker. You can change the format, just make sure to change it in all four procedures.
    What is critical to note here are the numbers that come right before the column names. These numbers become identifiers in the array used to capture the data. What APEX does is creates an array of up to 50 items it designates as F01-F50. The F is static, but the number following it corresponds to the number in your report declaration above, ie, F01 will contain the primary key value, F02 will contain the first numeric value, etc. While not strictly necessary, it is good practice to assign these values so you don't have to guess.
    One more note: I try to align the c00x values from the columns in the collection with the F0X values in the array to keep myself straight, but they are separate values that do NOT have to match. If you have an application you think might get expanded on, you can leave gaps wherever you want. Keep in mind, however, that you only have 50 array columns to use for data input. That's the limit of the F0X array even though a collection may have up to 1000 values.
    Now you need a way to capture user input. I like to create this as a BEFORE COMPUTATIONS/VALIDATIONS procedure that way the user can see what they changed (even if it is wrong). Use the Validations to catch mistakes.
    declare
      j pls_integer := 0;
    begin
    for j1 in (
      select seq_id from apex_collections
      where collection_name = 'MY_COLLECTION'
      order by seq_id) loop
      j := j+1;
      --VAL1 (number)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>2,p_attr_value=>wwv_flow.g_f02(j));
      --VAL2 (number)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>3,p_attr_value=>wwv_flow.g_f03(j));
      --VAL3 (text)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f04(j));
      --VAL4 (Date)
      apex_collection.update_member_attribute (p_collection_name=> 'MY_COLLECTION',
          p_seq=> j1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f05(j));
    end loop;
    end;Clear as mud? Walk through it slowly. The syntax tells APEX which Collection (p_collection_name), then which row (p_seq), then which column/attribute (p_attr_number) to update with which value (wwv_flow.g_f0X(j)). The attribute number is the column number from the collection without the "c" in front (ie c004 in the collection = attribute 4).
    The last one is your procedure to write the changes to the Database. This one should be a procedure that fires AFTER COMPUTATIONS AND VALIDATIONS. It uses that hidden KEY value to determine whether the row exists and needs to be updated, or new and needs to be inserted.
    declare
    begin
      --Get records from Collection
      for y in (select TO_NUMBER(c001) x_key, TO_NUMBER(c002) x_1,
                 TO_NUMBER(c003) x_2,
                 c004 x_3,
                 TO_DATE(c005,'MMDDYYYY') x_dt
               FROM APEX_COLLECTIONS
               WHERE COLLECTION_NAME = 'MY_COLLECTION') loop
        if y.x_key = 0 then  --New record
            insert into MY_TABLE (KEY_ID, COL1,
                COL2, COL3, COL4, COL5)
              values (SEQ_MY_TABLE.nextval, y.x_1,
                  y.x_2, y.x_3, y.x_4, y.x_dt);
        elsif y.x_key > 0 then  --Existing record
            update MY_TABLE set COL1=y.x_1, COL2=y.x_2,
                 COL3=y.x_3, COL4=y.x_4, COL5=y.x_dt
             where KEY_ID = y.x_key;
        else
          --THROW ERROR CONDITION
        end if;
      end loop;
    end;Now I usually include something to distinguish the empty new rows from the full new rows, but for simplicity I'm not including it here.
    Anyway, this works very well and allows me complete control over what I display on the screen and where all the data goes. I suggest using the APEX forms where you can, but for complex situations, this works nicely. Let me know if you need further clarifications.

  • How to do addition of two columns cells in Matrix.

    Hi All,
    I tried following code on LostFocus event of Mtrix. I want to do addition of two columns cells of matrix and addtion display in third column. I tried the following code but in this I am getting the column value and when i enterd any value in columns cells it disappear when i move to next column cells.
    Can anybody suggest me how to do it ?
    Dim i As Integer
                Dim v1, v2 As String
                matrix.Columns.Item("V_4").DataBind.SetBound(True, "", "matrixds")
                If pVal.ColUID = "V_4" Then
                    For i = 0 To matrix.RowCount - 1
                        v1 = matrix.Columns.Item("V_5").Cells.Item(i + 1).Specific.Value
                        v2 = matrix.Columns.Item("V_4").Cells.Item(i + 1).Specific.Value
                        Dim v3 As Integer = CInt(v1) + CInt(v2)
                        matrix.Columns.Item("V_3").Cells.Item(i + 1).Specific.Value = v3.ToString()
                    Next
                End If
    Thanks and Regards,

    Hi,
    u bind all the columns to the datasource in the matrix.then the value does not disappear.
    Change ur code as follows:
    Use the databind in formload
    matrix.Columns.Item("V_4").DataBind.SetBound(True, "", "matrixds1")
    matrix.Columns.Item("V_5").DataBind.SetBound(True, "", "matrixds2")
    matrix.Columns.Item("V_3").DataBind.SetBound(True, "", "matrixds3")
    Dim v1, v2 As sapbouicom.edittext
    If pVal.ColUID = "V_4" Then
    v1 = matrix.Columns.Item("V_5").Cells.Item(pVal.row).Specific
    v2 = matrix.Columns.Item("V_4").Cells.Item(pVal.row).Specific
    v3=  matrix.Columns.Item("V_3").Cells.Item(pVal.row).Specific
    v3.Value = v1 .Value + v2.Value
    End If
    Kind Regards
    Mohana

  • Hiding rows/columns completely in SSRS tablix even when they have data

    I have several columns and rows in my tablix.  I don't want to see all of them at once.  I am using a parameter that controls the visibility of the columns or rows of the tablix.  The issue is that it hides but the white space is left. 
    How do i take out that white space?

    Is the columns inside a group?If yes you've to set visibility property for group too in addition to rows and columns.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Form split across two columns

    I am trying to layout a form split across two columns. Is
    this possible, tables or divs?
    Test
    Page Here
    My test form only submits the fields on the right:
    Phone:
    Email:
    How did you here about us?
    Rich

    Joey,
    Gonna sound dim here...what where?
    <div class="form1">
    <table width="640" height="239" border="0"
    cellpadding="0" cellspacing="0">
    <tr>
    <td width="320" valign="top"> Name:
    <input type="text" name="t1" size="36" />
    <br />
    Company:
    <input type="text" name="t4" size="36" />
    <br />
    Address:
    <p><span class="Roman9px">
    <textarea rows="4" name="st"
    cols="35"></textarea>
    </span> </p>
    Your message or enquiry details:
    <p><span class="Roman9px">
    <textarea rows="4" name="t5"
    cols="35"></textarea>
    </span></p>
    </td>
    <td width="320" valign="top"><form method="post"
    action="SubmitForm.asp">
    <p></p>
    Phone:
    <p>
    <input type="text" name="t2" size="36" />
    <br />
    Email: </p>
    <p class="bold">
    <input type="text" name="t3" size="36" />
    </p>
    <p>
    <label>How did you here about us?<br />
    <select name="t6" id="t6">
    <option value="None Selected"
    selected="selected">Please Select</option>
    <option value="Internet Search">Internet
    Search</option>
    <option value="Advertising">Advertising</option>
    <option
    value="Recommendation">Recommendation</option>
    </select>
    </label>
    </p>
    <p class="Roman9px"> </p>
    <p class="Roman9px">
    <input type="submit" class="Roman10px" value="Submit"
    />
    </p>
    </form>
    </td>
    </tr>
    </table>
    </div>
    Rich

  • Apply Number Format across Rows

    Hi Experts - I need to apply the number format across rows. As a dimension I have a Bex Structure.
    Negetive number should be in red and there is also a % rows , which should have 2 decimal places.
    I need help how to fromat numbers across the rows while we have Bex structure in place.
    Structure      BUD     PF1     Total
    Amount--->     1000     -500.00     500.00
    % Amount-->5.00%     -15.00%     -10.00%
    Thanks
    R

    rohan1103,
    Right click the column and apply conditional fromatting. Your negative numbers should follow a code like this.
    Negative; [Red](In square braces)(#,##0.00).
    This will display any negative number in Red color.
    Thanks,
    karthik
    Edited by: kbharadwaj79 on Jun 20, 2011 12:16 PM
    Edited by: kbharadwaj79 on Jun 20, 2011 12:16 PM

  • Right way to change datagrid row, column, cells background colors in code-behind?

    Hi all,
    I have a winform program that I'm upgrading to wpf (I'm new to wpf). The wpf code for the function (SetdataGridBackgroundColors()) is below with the winform code commented out so I can fix it.  I have a datagrid with a Cornsilk background color alteranating
    with LightGreen depending on the content of datetime  cell. If the day portion of the datetime is different then the color changes from one to the other. I used a colorIndex variable because at the end of the month it could go from 31 to 1 and that would
    not work if I use the day directly.
    I tried this line to change the background color:
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk);
    this works but it changes every row. I found this other stuff:
    DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    Either ContainerFromIndex or ContainerFromItem throw an exception because currentRowColor is null. I looked at optionsDataDatagrid.Items[i] and is not null. Then I read that using ItemContainerGenerator is not a good idea.
    BTW I'm calling SetdataGridBackgroundColors() after datagrid is been filled with data.
    So... what is the proper way to set each row, column or cell background color in wpf?
    Thanks
    private void SetdataGridBackgroundColors()
    optionRowData rowData = new optionRowData();
    if (optionsDataDatagrid.Items.Count == 0)
    return;
    int colorIndex = 1;
    DateTime savedDate, currentRowDate;
    rowData = optionsDataDatagrid.Items[0] as optionRowData;
    savedDate = rowData.col_datetime.Date; //only compare the date not the time
    for (int i = 0; i < optionsDataDatagrid.Items.Count; i++)
    //currentRowDate = Convert.ToDateTime(optionsDataDatagrid.Rows[i].Cells[3].Value); //winform code
    //currentRowDate = currentRowDate.Date; //winform code
    rowData = optionsDataDatagrid.Items[i] as optionRowData;
    currentRowDate = rowData.col_datetime.Date;
    if (currentRowDate != savedDate)
    colorIndex++;
    savedDate = currentRowDate;
    if (colorIndex % 2 == 0)
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.Cornsilk;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk); //this changes all rows
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    //currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.DarkSalmon;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.Aquamarine;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);
    else
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.LightGreen); //this has no effect
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.Coral;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.LimeGreen;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);

    I (also) strongly recommend mvvm.
    Setting values is a particularly bad idea in this case.
    I don't mean to be rude but your explanation of the requirement is kind of vague.
    I would bind solidcolourbrushes.
    Set the properties based on whatever your logic is within the viewmodel.
    You can switch out what each of the brushes holds when the user clicks wherever.
    So you use a highlightbrush when something or other is true.
    That highlightbrush is set to a blue brush when the user clicks left and a red brush when they click right.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • How to get a single row column from a viewobject in java?

    I have a class file that goes out and gets a viewobject and sets its where clause
    this is it:
    vcRow = vc.createViewCriteriaRow();
    vcRow.setAttribute("LogonId", "='" + strPcis_Login.toUpperCase() + "'");
    vc.addElement(vcRow);
    vo.applyViewCriteria(vc);
    vo.executeQuery();
    I know this working cause I can watch it in debug..
    but now the problem.
    I've looked in the docs and don't see how one can pull the value of the row it found and place it in a uix page in a textinput area
    how can I get a single row column, in this case the UserName that is in the view object to a string and then place it into my
    uix page? I've looked and looked and don't see a method for this.
    is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
    what way do you do this and where is it documented?

    is there a way to take the oracle.cabo.servlet.Page and set a textinput with a viewobject get method?
    what way do you do this and where is it documented? What you can do is get the value from your VO and set it somewhere that UIX can data bind to -- as a Page proprety, on HttpSession, etc. This is documented in Chapters 4 (Data Binding) and 5 (Controller) of the UIX Developer's Guide.
    To set a property, you use Page.setProperty(String key, String value). Then, in your UIX file, to make a textInput that has the value pulled from a given page property, use:
    <textInput data:text="key@ctrl:page" />
    -brian
    Team UIX

  • How to get the selected rows & columns in the table?

    hi everybody,
                         In my application the table is kept inside the event structure.I select the cells  in the table (using mouse) on running time.How to get the selected number of rows & columns in that table?

    Hello,
    You can fill selected values of the table by writing to it or the corresponding property using a property node - the table is just a 2D array of strings.  I think for your "disable" question you are referring to the shortcut menu (when you right click).  If you are using LabVIEW 8.x, you can edit or disable that shortcut menu - just right click on your table at edit time and choose Advanced >> Run-Time Shortcut Menu.
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Where can I find the function "mark a line" in a table (not a row but the line in-between the rows/columns)

    In the old version of Numbers (09) as well as in the same Pages version I could choose to allow to mark single lines inbetween rows/columns in order to choose to create different types of lines to mark separations in different sections or just single cells within a table, how do I do that in the recent upgrade?!!! I´m going mad over here!!!!!

    Hi A-S,
    Do you mean Cell Borders in the Format Panel?
    To create this?
    Or if you want borders under only A5 and C5 (but not B5) command click on those cells to select them before applying the borders in Format Panel
    Regards,
    Ian.

  • How to print the row  ,column,and particular cell in separate color

    how to print the row  ,column,and particular cell in separate color IN ALV GRID

    HI,
    Here you go good program links
    <a href="http://www.sapfans.com/forums/viewtopic.php?t=52107">How to Set Color to a Cell in AVL</a>
    <a href="http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm">ALV Grid Coloring</a>
    Thanks
    Mahesh

  • How can I write into a table cell (row, column are given) in a databae?

    How can I write into a table cell (row, column are given) in a database using LabVIEW Database Toolkit? I am using Ms Access. Suppose I have three columns in a table, I write 1st row of 1st column, then 1st row of 3rd column. The problem I am having is after writing the 1st row 1st column, the reference goes to second row and if I write into 3rd column, it goes to 2nd row 3rd column. Any suggestion? 
    Solved!
    Go to Solution.

    When you do a SQL INSERT command, you create a new row. If you want to change an existing row, you have to use the UPDATE command (i.e. UPDATE tablename SET column = value WHERE some_column=some_value). The some_column could be the unique ID of each row, a date/time, etc.
    I have no idea what function to use in the toolkit to execute a SQL command since I don't use the toolkit. I also don't understand why you just don't do a single INSERT. It would be much faster.

  • Issue with row/column text lengths in report painter

    Hi Gurus,
    I have created a report painter report with formatting of the row/column length text as medium, but for one FS item/GL Account the report when executed still picks up only the short text length. I am not sure how this can be resolved.
    Any ideas is appreciated.
    Regards
    Satish

    Applied OSS Note 360096 and it worked. Thanks for all your help.

Maybe you are looking for