How to transpose columns to rows in OBIEE

Lets say I have a row of data with 3 columns as shown below.
Col1 Col1 Col3
Val1 Val2 Val3
How can this be shown as 3 rows as below
Col 1 Val1
Col 2 Val2
Col 3 Val2
Thanks.

Use the Narrative View
Prefix: <table border=1>
Narrative:
<tr><td>Col1</d><td>@1</td></tr>
<tr><td>Col2</d><td>@2</td></tr>
<tr><td>Col3</d><td>@3</td></tr>
Postfix:
</table>
Enjoy!

Similar Messages

  • How to transpose columns to rows in ODI

    Hi,
    I am trying to transpose Columns to rows along with Headers. For instance if i have
    Account Name | Assigned To | Lead Source | Currency | Onsite_April |Offisite_April2 | FCST AMC LIC April
    | | | | | |
    Microsoft | Mark | Channel1 | INR | 1000 | 2000 | 3000
    Then i need in the below way
    Account Name | Assigned To | Lead Source | Currency | Month | Amount
    | | | | |
    Microsoft | Mark | Channel1 | INR | Onsite_April | 1000
    Microsoft | Mark | Channel1 | INR | Offisite_April2 | 2000
    Microsoft | Mark | Channel1 | INR | FCST AMC LIC April | 3000
    Is there any specific function where i can achieve this?
    More over i need break up Month column into two i.e Onsite_April will be Onsite (in one column) April (in another column).

    Hi
    here is what i got by using the above KM
    create table cad_temp_1(item_id number, location_id number, sales_date_ud1 varchar2(100), qty_ud2 number);
    create table cad_temp_2(item_id number, location_id number, D01012010 number, D01022010 number);
    insert into cad_temp_2 values(1,1,200,300);
    commit;
    Source in interface is : cad_temp_2
    Target is: cad_temp_1
    Mapping is
    Item_id - Item_id execute on: CAD_TEMP_2 (Source selected) Update - Insert and Update checked
    Location_id - Location_id execute on: CAD_TEMP_2 (Source selected) Update - Insert and Update checked
    sales_date_ud1 - :NA execute on: <null> (Target selected) Update - Insert, Update, UD1 selected
    qty_ud2 - :NA execute on : <null> (Target selected) Update - Insert, Update, UD2 selected.
    Execute the interface
    It works.
    Thanks
    Bhaskar

  • How to transpose columns to rows?

    Hi,
    here is my situation and I would love is someone could give me some help.
    This is how my data is currently presented(first line represents the header, the second line represents the value:
    Number A1 A2 B1 B2 C1 C2
    001187 1 2 1 6 1 1
    and I would need to get it into the following format:
    Number A B C
    001187 1 1 1
    001187 2 6 1
    In summary all values from columns with same start name should be transposed into one column.
    Would anyone have any suggestions?

    Assuming you have one table that has the columns : Number A1 A2 B1 B2 C1 C2
    then something like :
    select number, a, b, c
    from (select 1 the_order, number, a1 a, b1 b, c1 c
    from table
    union all
    select 2 the_order, number, a2 a, b2 b, c2 c
    from table)
    order by number, the_order

  • Transposing columns to rows in excel through ODI

    Hi all,
    We are trying to transpose Columns to rows along with Headers considering excel as source and oracle table as target
    For example we are having metadata and data in Excel sheet like below
    Metadata:- A,B,TC1,TD1,L1,U1,TC2,TD2,L2,U2,TC3,TD3,L3,U3
    Data:-        X,Y,1,2,3,4,5,6,7,8,9,10,11,12
                     M,N,a,b,c,d,e,f,g,h,i,j,k,l
    Then we need in the below way in oracle table
    A,B,TC1,TD1,L1,U1
    X,Y,1,2,3,4
    X,Y,5,6,7,8
    X,Y,9,10,11,12
    M,N,a,b,c,d
    M,N,e,f,g,h
    M,N,i,j,k,l
    Is there any process to achieve this?
    If so Please let us know
    Thanks in advance

    Hi SH,
    Thanks for your reply
    We already tried http://s3.amazonaws.com/Ora/KM_IKM_Pivot.zip by following the link https://community.oracle.com/thread/904535?tstart=0
    But unfortunately we got the same error which is mentioned in that link
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 35, in ?
    java.sql.SQLException: Invalid column name
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    I am newbie to odi - if possible can you please guide me how to do transpose in odi by considering excel as source and oracle as target
    Thanks

  • Transpose columns to rows

    HI All,
    I want to transpose columns to rows in my reports. I tried through Pivot Table and i was able to do that, but columns name are not appearing in the left.
    Plz help me out how to do that with column name/
    Can we do the same with measure also???
    Thanks

    All, thanks for the information.
    I have a similar requirement as being discussed here. However, I do not have any measures in my report. It is a plain request which fetches data in three columns A, B and C (and variable number of rows depending on the data available).
    Can I still use pivot table to transpose this data such that the resultant display would have three rows always and variable number of columns, with the first column containing the header A, B and C ? If yes, how do I go about it? Else, is there any other approach?
    Thanks again
    I
    Edited by: user635102 on Sep 18, 2008 12:31 PM

  • Transpose columns into rows

    hi ,
    i need to transpose columns into rows ,
    i know i can use the UNION ALL but my num of columns will most likely not be fixed so how can i do that ?
    pls advise

    This is from one of the forms link,, i reallyy dont know the link, but i guess this is "adrains" code
    SQL> WITH ilv AS (
      2      SELECT str || ','                                   AS str
      3      ,     (LENGTH(str) - LENGTH(REPLACE(str, ','))) + 1 AS no_of_elements
      4      FROM   t
      5      )
      6  SELECT RTRIM(str, ',')                              AS original_string
      7  ,      SUBSTR(str, start_pos, (next_pos-start_pos)) AS single_element
      8  ,      element_no
      9  FROM  (
    10         SELECT ilv.str
    11         ,      nt.column_value AS element_no
    12         ,      INSTR(
    13                   ilv.str,
    14                   ',',
    15                   DECODE(nt.column_value, 1, 0, 1),
    16                   DECODE(nt.column_value, 1, 1, nt.column_value-1)) + 1 AS start_pos
    17         ,      INSTR(
    18                   ilv.str,
    19                   ',',
    20                   1,
    21                   DECODE(nt.column_value, 1, 1, nt.column_value)) AS next_pos
    22         FROM   ilv
    23         ,      TABLE(
    24                   CAST(
    25                      MULTISET(
    26                         SELECT ROWNUM FROM dual CONNECT BY ROWNUM < ilv.no_of_elements
    27                         ) AS number_ntt )) nt
    28        );
    ORIGINAL_STRING                 SINGLE_ELEMENT  ELEMENT_NO
    X,Y,Z                           X                        1
    X,Y,Z                           Y                        2
    X,Y,Z                           Z                        3
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  XXX                      1
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  Y                        2
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  ZZ                       3
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  AAAAA                    4
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  B                        5
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  CCC                      6
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  D                        7
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  E                        8
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  F                        9
    XXX,Y,ZZ,AAAAA,B,CCC,D,E,F,GGG  GGG                     10
    13 rows selected.
    Note that the above SQL performs the following steps:
        * determines how many elements are in each string (WITH clause);
        * for each string, generates a collection of n elements (TABLE expression), where n is the derived number of elements in the string. Note in particular the use of "less than" in the "CONNECT BY ROWNUM < ilv.no_of_elements" on line 26. In all versions other than 10.1.x, this will need to be "CONNECT BY ROWNUM <= ilv.no_of_elements" (i.e. "less than or equal to"). There is an unusual bug with this row-generation technique in 10.1 that generates an additional row from the CONNECT BY;
        * uses the generated rows in a Cartesian Product with the original data to generate n rows per string, based on the above definition of n;
        * calculates the start and end position of each element in each string (INSTR); and
        * cuts each element from each string (SUBSTR).

  • Transpose columns and rows in numbers

    I need to transpose columns and rows in Numbers and I do not want to write script to do it.  Is there an easier way?

    Give me a proper transpose and I will uninstall Excel and never look back.
    Ok, here's a proper transpose, that can be placed in an Automator Service so it becomes a simple menu pick as below (and can also be assigned a keyboard shortcut).
    To use it (this is slightly different from Excel) you select the range you want to transpose, choose Copy Transpose, click a destination cell in an existing table in the current document or another document, and command-v (Edit > Paste) or option-shift-command-v (Edit > Paste and Match Style).
    The one-time setup is as follows.  In Automator choose File > New > Service,  drag a Run AppleScript action from the left into the right pane, choose 'No Input' for 'Services receives selected' and 'Numbers' for 'in'. Then paste the following into the Run AppleScript action, replacing all text already there by default:
    --Transpose - select range, run, paste transposed values where wanted
    try
              tell application "Numbers" to tell front document to tell active sheet
                        set selected_table to first table whose class of selection range is range
                        tell selected_table
                                  set my_selection to the selection range
                                  set first_col to address of first column of my_selection
                                  set last_col to address of last column of my_selection
                                  set first_row to address of first row of my_selection
                                  set last_row to address of last row of my_selection
                                  set str to ""
                                  repeat with i from first_col to last_col
                                            repeat with j from first_row to last_row
                                                      set str to str & (value of cell j of column i of selected_table) & tab
                                            end repeat
                                            set str to str & return -- add line return after row
                                  end repeat
                        end tell
              end tell
      set the clipboard to str
              display notification "Ready to paste transposed values" with title "Numbers"
    on error
              display dialog "Select a range first and then try again"
    end try
    --end script
    Hit the compile "hammer" and the script should indent properly. Then save the service with the name you want to appear in your menu, and it will thereafter be available via the Services menu (and keyboard shortcut, if you set one up in System Preferences > Keyboard > Shortcuts > Services).
    That's it. Less then five minutes' one-time set-up work and you've got a menu pick for a transpose functionality that is as convenient as Excel's.
    SG

  • How to turn columns into rows

    Hi. Does anyone know how to turn columns into rows ie:
    select field1, field2, field3, field4, field5 from table
    desired result:
    field1 field2
    field1 field3
    field1 field4
    field1 field5
    Thank you!

    Something like this ?
    select field1
    , case n.l
    when 1 then field2
    when 2 then field3
    when 3 then field4
    when 4 then field5
    end field
    from table
    , (select level l from dual connect by level <= 4) n

  • How to freeze column and row headers of a table

    How to freeze column and row headers of a table in jsp and javascript. An example is available in
    http://www.massless.org/_tests/grid1/ pls help to find a solutionj
    Thanks in anticipation
    Sreejesh

    At least I don't stop you from that. I also don't see any benefits in this topic.
    Success.

  • How to Transpose series of rows & columns to singular inline column?

    Hi gang!
    Looking to do the reverse of my previous post (here: http://discussions.apple.com/message.jspa?messageID=9355192#9355192).
    Specifically, looking to transpose from many rows & columns to 1 inline column...
    from:
    A1 A2 A3 A4 A5 A6 A7
    B1 B2 B3 B4 B5 B6 B7
    to:
    A1
    A2
    A3
    A4
    A5
    A6
    A7
    B1
    B2
    B3
    B4
    B5
    B6
    B7
    For a whole set of data (over 330 rows of 7 columns)!
    A function for doing the inverse was graciously provided in the previous post, but am stuck as to how to reverse it!
    Previous (from 1 column to many):
    INDEX(TRANSPOSE('Table_Src' :: B2:H2),7,1*(ROW()-2)+COLUMN()-1)
    becomes... (from many to 1 column)
    Anyone with ideas? Found the Function guide only more confusing! :O

    I would use this simple script:
    --[SCRIPT] on run
    set {rname, tName, sName, dName, colNum1, rowNum1, colNum2, rowNum2} to my getSelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    set liste to {}
    repeat with r from rowNum1 to rowNum2
    repeat with c from colNum1 to colNum2
    copy value of cell r of column c to end of liste
    end repeat
    end repeat
    end tell
    set liste to my recolle(liste, return)
    set the clipboard to liste
    end run
    --=====
    on getSelParams()
    local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
    set {r_Name, t_Name, s_Name, d_Name} to my getSelection()
    if my parleAnglais() then
    if r_Name is missing value then error "No sheet has a selected table."
    else
    if r_Name is missing value then error "Aucune feuille ne contient une table sélectionnée."
    end if
    set two_Names to my decoupe(r_Name, ":")
    tell application "Numbers" to tell document d_Name to tell sheet s_Name to tell table t_Name
    set col_Num1 to address of column of cell (item 1 of two_Names)
    set row_Num1 to address of row of cell (item 1 of two_Names)
    if item 2 of two_Names = item 1 of two_Names then
    set {col_Num2, row_Num2} to {col_Num1, row_Num1}
    else
    set col_Num2 to address of column of cell (item 2 of two_Names)
    set row_Num2 to address of row of cell (item 2 of two_Names)
    end if
    end tell -- _Numbers …
    return {r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2}
    end getSelParams
    --=====
    set {r_Name, t_Name, s_Name, d_Name} to my getSelection()
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers" to tell document 1
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    try
    (selection range of table y) as text
    on error errMsg number errNum
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    return {theRange, theTable, theSheet, theDoc}
    end try
    end repeat -- y
    end if -- x>0
    end tell -- sheet
    end repeat -- i
    end tell -- document
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on recolle(l, d)
    local t
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to ""
    return t
    end recolle
    --=====
    on parleAnglais()
    local z
    try
    tell application "Numbers" to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    Select the range to transpose
    Run the script
    paste where you want.
    Yvan KOENIG (from FRANCE lundi 4 mai 2009 15:17:08)

  • How to convert columns into rows using  transpose function

    Hi
    anybody tell me how to convert columns values into rows using transpose function.

    Since BluShadow went to all the trouble to put it together, someone should use it.
    See the post titled How do I convert rows to columns? here SQL and PL/SQL FAQ
    John

  • How to make Column and Row headers bold in Web template?

    Hi Experts,
    I have a web application with a query in it. Now I would like to know how I could make the column and row headers of this webquery in bold font? I havent found any properties in any web item to make this possible. It looks like the only way to do this is CSS, but i dont have any experience with style sheets.
    Are there easier ways to do this?
    Thanks in advance.
    Rgds,
    Richard

    Tried this for fun using JavaScript.  It appears to work, but is pretty much a hack, and I didn't test it thoroughly.
    Place this in a function that is called during onload of the page:
         var eleid='';
         for(var ct=0;ct<1000;ct++) {
              eleid='ANALYSIS_interactive_mc'+ct+'_tv';
              if (document.getElementById(eleid)) {
                   if(document.getElementById(eleid).parentNode.className=='urLayoutPadless') {
                        document.getElementById(eleid).style.fontWeight='bold';

  • How to convert column to row in 10g  and calculate the count

    876602 wrote:
    Hi ,
    i need to convert the column to row in my DB 10g , i cant use the Decode method because i have about 2000 items in MDN column
    this is sample of my date ,
    MDN             Date
    5C4CA98EABA3     20111205235240
    5C4CA98EABA3     20110925121833
    5C4CA98EABB0     20111025103700
    5C4CA98EABB0     20111124103700
    5C4CA98EABB5     20111030175717
    5C4CA98EABB8     20110925142653
    5C4CA98EABB8     20111126175853i need the result to be ,
    MDN             Date                                   count
    5C4CA98EABA3     20111205235240 ;  20110925121833    2
    5C4CA98EABB0     20111025103700 ;  20111124103700    2
    5C4CA98EABB5    20111030175717                      1
    5C4CA98EABB8   20110925142653 ; 20111126175853       2any help please ,
    Edited by: 876602 on 15/12/2011 01:33 ص

    SQL> with t as
      2  (
      3  select '5C4CA98EABA3' MDN ,'20111205235240' Dte  from dual
      4  union all
      5  select '5C4CA98EABA3','20110925121833' from dual
      6  union all
      7  select '5C4CA98EABB0','20111025103700' from dual
      8  union all
      9  select '5C4CA98EABB0','20111124103700' from dual
    10  union all
    11  select '5C4CA98EABB5','20111030175717' from dual
    12  union all
    13  select '5C4CA98EABB8','20110925142653' from dual
    14  union all
    15  select '5C4CA98EABB8','20111126175853' from dual
    16  )
    17  select mdn,ltrim(sys_connect_by_path(dte,';'),';') s,rw as "count"
    18  from
    19  (
    20  select mdn,dte,row_number() over(partition by mdn order by mdn) rw
    21  from t
    22  )
    23  where connect_by_isleaf = 1
    24  start with rw = 1
    25  connect by prior rw = rw-1
    26  and prior mdn = mdn
    27  ;
    MDN          S                                                                                     count
    5C4CA98EABA3 20111205235240;20110925121833                                                             2
    5C4CA98EABB0 20111025103700;20111124103700                                                             2
    5C4CA98EABB5 20111030175717                                                                            1
    5C4CA98EABB8 20110925142653;20111126175853                                                             2

  • How to convert column to row in 10g

    Hi ,
    i need to convert the column to row in my DB 10g , i cant use the Decode method because i have about 2000 items in MDN column
    this is sample of my date ,
    MDN             Date
    5C4CA98EABA3     20111205235240
    5C4CA98EABA3     20110925121833
    5C4CA98EABB0     20111025103700
    5C4CA98EABB0     20111124103700
    5C4CA98EABB5     20111030175717
    5C4CA98EABB8     20110925142653
    5C4CA98EABB8     20111126175853i need the result to be ,
    MDN             Date
    5C4CA98EABA3     20111205235240 ;  20110925121833 
    5C4CA98EABB0     20111025103700 ;  20111124103700
    5C4CA98EABB5    20111030175717
    5C4CA98EABB8   20110925142653 ; 20111126175853any help please ,
    Edited by: 876602 on 15/12/2011 01:33 ص

    Note the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions)*", so only for issues with the SQL Developer tool. Please post these questions under the dedicated {forum:id=75} forum.
    Regards,
    K.

  • Transpose columns and rows / Switch columns and rows

    Hello,
    Is it possible to interchange columns and rows in order to create a left-to-right scrolling table instead of a top-to-bottom scrolling one?
    In detail:
    I have this:
          | col 1 | col 2 | col 3
    row 1 |       |       |
    row 2 |       |       |
    row 3 |       |       |
    ...   |       |       |
    ...and want to have this:
          | row 1 | row 2 | row 3 | ...
    col 1 |       |       |       |
    col 2 |       |       |       |
    col 3 |       |       |       |
    Does anyone know if this is possible with the standard table or the ALV?
    Thanks in advance & Kind regards,
    Robert

    Hi,
    So there is no easy solution by just setting a flag in the ALV config!? ...too bad!
    As for the dynamic creation:
    Would there be an issue with different data types in one "column" (former row)? As a matter of fact there probably will be a mix of character, numbers, ...
    Regards,
    Robert

Maybe you are looking for