Concatenate 2 columns from 2 different dimension tables

Hi,
I have 2 columns one from each dimension table.
Column A from Dimension 1 and Column B from Dimension 2.
In my answers i want the results as "dim1.Col A / Dim2.Col B".
I used the concatenate function and it dint give me the results. Both the columns are Non Numeric columns.
I use 2 fact tables in my analysis and data from both the fact tables are combined in 1 analysis.
There are non confirming dimensions between the 2 facts and hence we used hierarchies and level based measures to overcome the issue of non conforming dimensions between the 2 facts.
Any ideas on how to concatenate the 2 different dimension columns into the report ?
Thanks,
Chandra

never mind, i did it using summary columns, thanks

Similar Messages

  • OBIEE Group By on 2 facts and concatenated columns from different dimensions

    Hi
    I have a different kind of problem involving 2 fact tables with different dimensional attributes.
    Fact 1 has Dim Attributes ( Cust,Facility )
    Measure - Gross Amount
    Fact2 has Dim attributes (Cust,Facility and Risk Group )
    Measure : Exposure Amount
    Since we have 2 facts with different dimensions,
    to exclude the 'Risk Group' dimension column from the group by for the Fact1,
    we set the 'Gross Amount' measure to total level (Risk Group Dimension ) in contents tab.
    So the values from both the fact tables appears in the same report correctly.
    But in the same report we have another requirement where the rating column from the customer dimension has to be concatenated with the ratings column in the facility dimension.
    We have to concatenate customer.rating with the facility.rating and display it in the report.
    when we just pull the individual columns from the dimensions into the report it works fine.
    But when we try to concatenate the 2 columns and show it in the report,
    the concatenated column does not appear in the select or the group by in the SQL Fact2.( Generated by OBIEE )
    The other fact1 has the concatenated column in the select as well as the group by clause ( Generated by OBIEE )
    As a result the report shows the concatenated values only for the results from the Fact1. But the results from Fact2 does not have the concatenated column values.
    The report should look like the below:
    Custor.Name,     Customer.Id,     Facility.Name,     Facility.Id,     Customer.Rating/Facility.Rating,     Risk Group,     Gross Amount,     Exposure Amount
    ===========    =========      ===========     =========   ========================      =========     ===========     ===============
    JPMC                123                    GROSS               123               08/10                                                  LNL                    45,000               25,000
    CLAIRE               456                    NET                    456               07/10                                                  RNK                    50,000               30,000
    Thanks,
    Chandra

    As suggested you really want to move your none-aggregated fact attributes to a logical dimension (using the same physical table as the logical fact). Map this in the BMM layer as a snowflake, Place a hierarchy on this dimension with (at minimum) Total -> Detail levels, then on the other fact table you want to include in the report, set the content level on your other fact measures to the 'Total' level for your new logical Dim and it will allow them to be present in the same report.

  • Can OBIEE handle hierarchy built from different dimension tables?

    Can I build an hierarchy with values at various levels appearing from other dimension tables in the model ?
    Thanks

    Hi,
    if you want to drill in Answers from an attribute of a dimension to the attribute of anothr dimension, you can use the Preferred Drill Path inside the level of an hierachy.
    For example:
    Dime Time
    -Year
    --Month
    ---Day
    Dim Geography
    -Continent
    --Nation
    ---City
    If you set in the Month level of the Dim Time the Preferred Drill Path to Nation, in Answer when you drill from Month you see Nation.
    I hope it helps.
    Regards,
    Gianluca

  • Concatenate columns from different Sql queries

    Hi ,
    I have two different queries on a same table with different conditions. I cant have these conditions in a single query as the result is not what is expected. But i have few common columns and I want the results of these queries next to the common columns. Below are the two different queries ..which I want the output to be concatenated in terms of columns :
    Query 1 :
    select * from
    ( select location,facility,floor,phase, seat_type,count(seat_type) abc from sa_master_table group by location,facility,floor,phase, seat_type order by location,facility,floor,phase, seat_type)
    pivot
    (sum(abc) for seat_type in ('Cabin','PL','Regular', 'Squeeze'))
    Query 2:
    select * from
    ( select location,facility,floor,phase, seat_type,count(seat_type) xyz from sa_master_table where employee = 'Vacant' group by location,facility,floor,phase, seat_type order by location,facility,floor,phase, seat_type)
    pivot
    (sum(xyz) for seat_type in ('Cabin','PL','Regular', 'Squeeze'))
    Hoping to find some solution for this..
    Thanks!

    Hi All,
    Thanks for your replies, but sorry for all the confusion. This is the first time I am in this pl/sql forum, so wasnt clear on providing the details.
    Ok.. Here are the details which I guess would be easier to understand my requirement :
    * I am working on Oracle Application Express 3.1 and this is where I want my query to be placed.
    * My previous post above has the exact query(s) which I am trying to format as below.
    Typical Output of the query is as below :
    h5. Location     Facility Floor     Phase     Cabin     PL      Regular     Squeeze
    Location1     Facility1 Floor1 Phase1 3 5 6 10
    Once I combine the results of these query, I want the output in the below format. And this is the requirement which I am looking at :
    h6. ************************************ |Total Allocated Seats     *******************|Vacant Seats
    h5. Location     Facility     Floor     Phase | Cabin     PL     Regular Squeeze |     Cabin PL     Regular Squeeze
    Location1     Facility1     Floor1 Phase1 | 3      5     6     10 | 1     0     2     3
    Location2     Facility2 Floor2 Phase2 | 2     6     10     3 | 0     2     1     4
    Query1 give the values of 'Total Allocated Seats' and Query2 gives the values of 'Vacant Seats'. Its basically appending the resultant columns of the queries which have the same columns but values are dependent on the conditions. I have 2 more queries which got to append after Vacant seats.
    I have tried using UNION , but it actually appends the values horizontally but I want them vertically as above.
    And as rightly told by Tk, Q2 is subset of Q1 and so would be other queries.
    I tried my best to have the format appear correctly.. but still its not aligned properly. In case of queries, please get back to me.Thanks!

  • Concatenate columns from two different reports

    In OBIEE 11g report, I am looking for a method to concatenate columns from two different reports.
    My requirement is, if I show 'Units Produced' for customer A, I need to show another column 'Units Produced' for a related customer B.
    Every customer has one related customer.
    So my report shows all the data for customer A, but I need to add one column which is for custome B , so I am looking a way to concatenate columns or if some other way this can be done

    Customer A is dimension table. You mapped to fact to get Customer A details.
    Now you want for Customer B. Now create one more alias table for Customer and name it as customer B and join with Fact on Customer B keys and use it.
    Each customer has related customer.
    2 dimension tables one for customer and other for related customer.

  • Trying to use 2 different Dimension tables and make a hierarchy on some columns which are split into these dimensions .. how do I do that

    Trying to use 2 different Dimension tables and make a hierarchy on some columns which are split into these dimensions .. how do I do that

    If you need to make a hierarchy in an Attribute view you need to have all relevant fields/columns in the same Dimension table..

  • Columns from different tables displayed in an ADF table format

    I have a many to one relationship between 2 tables (checklist -> subcontract). I would like to display columns from each table on a web page in an ADF Read Only Table format. I created a method that returns the data I need from the tables. When I drag that method over to my page JDev I'm only allowed to select columns from either the checklist table OR the subcontract table. I need one column from the subcontract table and several columns from the checklist table. I'm using JDev 10.1.3.2 and an Oracle 11g database. Thank you in advance.
    -Wade

    Thank you for your response. I ended up creating a new getter in the Checklist table which refers to the column in the Subcontract table. Then I was able to create a table column for that returned value.
    Thanks again!
    -W

  • How to insert select columns from one internal table to another

    Hi,
    How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
    regards,
    Sriram

    Hi,
    If your question is for copying data from 1 int table to other ;
    we can use
    APPEND LINES OF it_1 TO it_2.
    or if they have different columns then:
    loop at it_1 into wa_it1.
    move wa_it1-data to wa_it2-d1.
    apped wa_it2 to it_2.
    clear wa_it2.
    endloop.
    thnxz

  • How to insert  data from different internal  table  into a data base table

    hi all,
             I want to insert a particular field in an internal table to a field in a data base table.Note that the fields in the internal table and database table are not of the same name since i need to insert data from different internal tables.can some one tell me how to do this?
    in short i want to do something like the foll:
    INSERT  INTO ZMIS_CODES-CODE VALUE '1'.
    *INSERT INTO ZMIS_CODES-COL1 VALUE DATA_MTD-AUFNR .(zmis_codes is the db table and data_mtd is the int.table)

    REPORT  ZINSERT.
    tables kna1.
    data: itab LIKE KNA1.
    data lv_kUNAG LIKE KNA1-KUNNR.
    lv_kuNAG =  '0000010223'.
    ITAB-kuNNR = lv_kuNAG.
    ITAB-name1 = 'XYZ'.
    INSERT INTO KNA1 VALUES ITAB.
    IF SY-SUBRC = 0.
    WRITE:/ 'SUCCESS'.
    ELSE.
    WRITE:/ 'FAILED'.
    ENDIF.
    Here lv_kunag is ref to kna1 kunnr passed in different name
    In internal table .
    Try and let me know if this logic dint work.

  • Multiple Hierarchies from Single Dimension Table in OBIEE-11g?

    Is it possible to have Multiple Hierarchies from Single Dimension Table in OBIEE-11g?
    Like 1)Year-Qtr-Month-Weeks 2)Year-Month-Days

    Hi,
    or if your lowest level is the same like
    Day->month->year->Total
    Day->businessMonth->businessyear->Total
    Then yes, it is.
    Create the first, then you start to create the second by adding your top(business year) level on the same level as the one you have (year) both under your total.
    Then when you would add your second base level, there is a special option for it, something like use other hierarchy level/shared level (sorry can't recall and does not have a connection right now) then you select your existing day level under your businessmonth level.
    Hope this helps,
    Regards,
    D

  • How to join  fields from different internal tables and display into one int

    hai i have one doubt...
    how to join  fields from different internal tables and display into one internal table..
    if anybody know the ans for this qus tell me......

    hii
    you can read data as per condition and then can join in one internal table using READ and APPEND statement..refer to following code.
    SELECT bwkey                         " Valuation Area
             bukrs                         " Company Code
        FROM t001k
        INTO TABLE i_t001k
       WHERE bukrs IN s_bukrs.
      IF sy-subrc EQ 0.
        SELECT bwkey                       " Valuation Area
               werks                       " Plant
          FROM t001w
          INTO TABLE i_t001w
           FOR ALL ENTRIES IN i_t001k
         WHERE bwkey = i_t001k-bwkey
           AND werks IN s_werks.
        IF sy-subrc EQ 0.
          LOOP AT i_output INTO wa_output.
            READ TABLE i_t001w INTO wa_t001w WITH KEY werks = wa_output-werks.
            READ TABLE i_t001k INTO wa_t001k WITH KEY bwkey = wa_t001w-bwkey.
            wa_output-bukrs = wa_t001k-bukrs.
            MODIFY i_output FROM wa_output.
            CLEAR wa_output.
          ENDLOOP.                         " LOOP AT i_output
        ENDIF.                             " IF sy-subrc EQ 0
    regards
    twinkal

  • Fetch data from different database tables

    Hi...
    How can i fetch data from different database tables and put it into a internal table and then display it??? Can provide simple short codes as i'm new to ABAP. Thanks.

    Hi,
    Check this sample code..
    TYPE-POOLS: slis.
    DATA: BEGIN OF itab OCCURS 0,
            vbeln TYPE vbeln,
            expand,
          END OF itab.
    DATA: BEGIN OF itab1 OCCURS 0,
            vbeln TYPE vbeln,
            posnr TYPE posnr,
            matnr TYPE matnr,
            netpr TYPE netpr,
          END OF itab1.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'POSNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'POSNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'MATNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'MATNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'NETPR'.
    s_fieldcatalog-do_sum    = 'X'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    DATA: s_layout TYPE slis_layout_alv.
    s_layout-subtotals_text            = 'SUBTOTAL TEXT'.
    s_layout-key_hotspot = 'X'.
    s_layout-expand_fieldname = 'EXPAND'.
    SELECT vbeln UP TO 100 ROWS
           FROM
           vbak
           INTO TABLE itab.
    IF NOT itab[] IS INITIAL.
      SELECT vbeln posnr matnr netpr
             FROM vbap
             INTO TABLE itab1
             FOR ALL ENTRIES IN itab
             WHERE vbeln = itab-vbeln.
    ENDIF.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA: s_keyinfo TYPE slis_keyinfo_alv.
    s_keyinfo-header01 = 'VBELN'.
    s_keyinfo-item01   = 'VBELN'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
         EXPORTING
              i_callback_program = v_repid
              is_layout          = s_layout
              it_fieldcat        = t_fieldcatalog
              i_tabname_header   = 'ITAB'
              i_tabname_item     = 'ITAB1'
              is_keyinfo         = s_keyinfo
         TABLES
              t_outtab_header    = itab
              t_outtab_item      = itab1
         EXCEPTIONS
              program_error      = 1
              OTHERS             = 2.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks
    Naren

  • How to update multiple columns from different tables using cursor.

    Hi,
    i have two tables test1 and test2. i want to udpate the column(DEPT_DSCR) of both the tables TEST1 and TEST2 using select for update and current of...using cursor.
    I have a code written as follows :
    DECLARE
    v_mydept1 TEST1.DEPT_CD%TYPE;
    v_mydept2 TEST2.DEPT_CD%TYPE;
    CURSOR C1 IS SELECT TEST1.DEPT_CD,TEST2.DEPT_CD FROM TEST1,TEST2 WHERE TEST1.DEPT_CD = TEST2.DEPT_CD AND TEST1.DEPT_CD = 'AA' FOR UPDATE OF TEST1.DEPT_DSCR,TEST2.DEPT_DSCR;
    BEGIN
    OPEN C1;
         LOOP
              FETCH C1 INTO v_mydept1,v_mydept2;
              EXIT WHEN C1%NOTFOUND;
              UPDATE TEST2 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
              UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
         END LOOP;
         COMMIT;
    END;
    The above code when run says that it runs successfully. But it does not updates the desired columns[DEPT_DSCR].
    It only works when we want to update single or multiple columns of same table...i.e. by providing these columns after "FOR UPDATE OF"
    I am not sure what is the exact problem when we want to update multiple columns of different tables.
    Can anyone help me on this ?

    oops my mistake.....typo mistake...it should have been as follows --
    UPDATE TEST1 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
    UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
    Now here is the upated PL/SQL code where we are trying to update columns of different tables --
    DECLARE
    v_mydept1 TEST1.DEPT_CD%TYPE;
    v_mydept2 TEST2.DEPT_CD%TYPE;
    CURSOR C1 IS SELECT TEST1.DEPT_CD,TEST2.DEPT_CD FROM TEST1,TEST2 WHERE TEST1.DEPT_CD = TEST2.DEPT_CD AND TEST1.DEPT_CD = 'AA' FOR UPDATE OF TEST1.DEPT_DSCR,TEST2.DEPT_DSCR;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO v_mydept1,v_mydept2;
    EXIT WHEN C1%NOTFOUND;
    UPDATE TEST1 SET DEPT_DSCR = 'PLSQL1' WHERE CURRENT OF C1;
    UPDATE TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1;
    END LOOP;
    COMMIT;
    END;
    Please let us know why it is not updating by using using CURRENT OF

  • Question about suming two columns from different tables in Subquery?

    Hello everyone,
    I have a subquery that works great for getting the total SUM of a Billing table, but I also need to add to that SUM the total surcharges or additional charges from a separate table.  I tried this by doing something like so:
    (SELECT SUM(SUM(Amount) FROM Billing WHERE Billing.JobID = Jobs.ID AND Billing.BillingType = 'Invoice' AND Billing.InvoiceCanceled = 'No', SUM(Payment) FROM Payments WHERE Payments.JobID = Jobs.ID AND Payments.Type = 'Bill')) as [Amount],
    But it doesn't work as there is an incorrect syntax near 'FROM'.  I'm assuming this is because of the two FROM's in the Subquery?  But I am not sure how else I would be able to do this then?  
    Any help would be greatly appreciated.  I just noticed this bug and am hoping to get a fix out as quickly as possible.
    Thanks Again,

    Hi, sorry for taking so long to get back to this post. 
    I tried this example like so:
    (SELECT SUM(A1) AS Total1, SUM(A2) AS Total2
    FROM
    (SELECT
    (SELECT SUM(Amount) FROM Billing WHERE Billing.JobID = Jobs.ID AND Billing.BillingType = 'Invoice' AND Billing.InvoiceCanceled = 'No') AS A1,
    (SELECT SUM(Payment) FROM Payments WHERE Payments.JobID = Jobs.ID AND Payments.Type = 'Bill') AS A2),
    However, get an error that an Incorrect Syntax exists near the ','.  I remove the comma (Which I think should be there), and I get an error that an Incorrect Syntax exists near the '.'...
    I also tried doing it like this (Based on other suggestions I've found online:
    (SELECT SUM(SELECT SUM(Amount) FROM Billing WHERE Billing.JobID = Jobs.ID AND Billing.BillingType = 'Invoice' AND Billing.InvoiceCanceled = 'No') as [Amount],
    (SELECT SUM(Payment) FROM Payments WHERE Payments.JobID = Jobs.ID AND Payments.Type = 'Bill') as [Additional]),
    And I get an error that an Incorrect Syntax exists near 'SELECT'...
    I also tried doing something like this with the SQL I already had...
    (SELECT SUM(Amount) FROM Billing WHERE Billing.JobID = Jobs.ID AND Billing.BillingType = 'Invoice' AND Billing.InvoiceCanceled = 'No') as [BilledAmount],
    (SELECT SUM(Payment) FROM Payments WHERE Payments.JobID = Jobs.ID AND Payments.Type = 'Bill') as [Additional],
    SUM(BilledAmount + Additional) AS [TotalBilled],
    But I get an error that the alias' are Invalid Column Names...  I have used Alias' before so I'm not sure why this would be an issue here...
    As you can see, I've been trying to figure this issue out, but haven't had much luck...  :(

  • How to delete columns from process form table

    hi,
    I have a process form UD_FN_USR. I created one column userid with type long and later the requirement got changed and I need to change the type to string.I am able to delete the column from design console but in the table the column exits so that I coulnt create the column with same name as type string , its tellling same column name exits with different datatype in current version or previous versions.can anybody please tell me how to solve this issue

    Sorry for late response. Got stuck in work.
    This time it will answered ;-)
    ALTER TABLE UD_ABCD DROP COLUMN UD_ABCD_UID
    DELETE FROM SDC WHERE  SDC_NAME='UD_ABCD_UID';
    COMMIT;
    Thanks
    Rajiv Dewan

Maybe you are looking for

  • Migrationtool  SAP R/3 4.0b - SAP Enterprise

    Hello, I am searching for a migration tool, which imports data from SAP 4.0b to SAP Enterprise. Our source-system 4.0b is a absolute non-standard SAP-system; e.g. our PP-processes are a mix between MM, SD and of course PP. To achieve a nearly-standar

  • How to insert record inside the internal table in below code

    Hi all, My requirement is to find the sub-total and need to insert in between the internal table. You can see the output ....where I want the sub-total F2 when 1 & 2 combindely , 3 , 4& 5 combindely .Please check it and let me know is it possible whe

  • HOW TO- Smooth out your animation jittering and tearing

    I've found a couple of workarounds that will smooth out your animations. There are JVM arguments that you can pass that allow you to set the scenegraph animation framerate and vsync properties. Increasing the framerate pulse and settig vsync to true

  • Median in OBIEE

    I have a requirement to get Median 10 sales in a given month. I was trying to implement this with Median function but it is not getting the way I expected. Is there a way to find Median 10 like Top 10 and Bottom 10 sales, I see TOPN and BOTTOMN funct

  • Lost my sidebar on all internet browsers

    Lost my sidebar on all internet browsers.... Need a fix. Just cant scroll up or down.