Count on a column In BMM Layer of Obiee

Hi All,
How to implement below SQL in OBIEE BMM layer
SELECT   COUNT ( * )
            FROM  dept, emp
           WHERE       emp.origrecordid = dept.depno
                 AND emp.empname = 'xyz'
Please help me on this

create a metric with expression
count(employee_id)
the value for this metric will vary based on columns selection on Answers
~ http://cool-bi.com

Similar Messages

  • Case statement problem for a column in BMM layer

    Hi friends.
    In physical layer I've a "cardio" column whose data type is INT, and two values comes here either 0 or 1.
    I need to replace 1 by 'YES' and 0 by "NO'.
    For that I changed the datatype of "Cardio" column to CHAR. and in BMM layer I'm using this formula
    CASE WHEN "A Analysis"."C Report"."CARDIO" = '1' THEN 'Yes' ELSE 'No' END
    But this is giving me "Invalid Expression" error.
    Please help me correct this error.
    Help appreciated.

    Hi,
    Your are probably using the column Cardio as a 'source' and as a 'target'.
    So you have to duplicate the cardio column (right mouse click and Duplicate option) in the business model and then apply the formula CASE WHEN "A Analysis"."C Report"."CARDIO" = '1' THEN 'Yes' ELSE 'No' END
    That should work. It is not even necessary to change datatype of Cardio, OBI will handle this for you.
    Regards
    Edited by: wobiee1 on Nov 12, 2008 1:07 PM

  • Sum Aggregation Error in Physical & BMM Layer in OBIEE 11g with Essbase 11

    Hi everyone,
    I'm using OBIEE 11g with Essbase 11 as the data source. I'm using Sample Basic database from the Essbase as my data source. If I'm using the hierarchy for the measures (so I don't flatten the measures), and when I changed the aggregation in both physical and BMM layer from Aggregate_External to Sum, I can't create a report at all from the Answers.
    Does anyone encounter the same thing? Any ideas/solution about this? Please help.
    Thanks a lot!

    Hi Deepak,
    When I picked the "Basic - measure" alone, I got this error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 96002] Essbase Error: Unknown Member Basic - measure used in query (HY000)
    SQL Issued: SELECT 0 s_0, "Sample Basic"."Basic"."Basic - measure" s_1 FROM "Sample Basic".
    When I picked the "Gen1,Measures" alone from the measure dimension, I got this error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Optimizer\ServiceInterfaceMgr\SIMDB\Src\SQOIMDXGeneratorGeneric.cpp, line 2610. (HY000)
    SQL Issued: SELECT 0 s_0, "Sample Basic"."Measures"."Gen1,Measures" s_1, SORTKEY("Sample Basic"."Measures"."Gen1,Measures") s_2 FROM "Sample Basic"
    But when I queried the dimensions one by one (only single dimension each), no error was shown.
    This only happens if I use Sum in the physical and BMM layer. If I use External_Aggregation, these errors do not happen. And if I flatten the measures, these errors also do not happen.

  • Not able to find logical dimension tab in BMM layer in OBIEE 11G

    Hi All,
    Recently i ran in to a interested problem. We are using Oracle BI Administration Tool version 11.1.1.6.6, Repository Version:320.
    I'm not able to see logical dimension tab to create dimensional hierarchy.
    I followed normal method like all versions. Business model -> New Object -> (No logical dimension). I'm able to see logical display folder and logical Table.
    I have only client tool on my machine. Please could anyone suggest me How should i resolve this problem.
    Any help is appreciated.
    Thanks,
    Ashwini K.

    Hi Srinu,
    I joined all dimensions to facts, and i'm sure that i'm trying to create hierarchy for dimension tables. In oracle Administration Tool Repository version : 308, i'm able to see logical dimension tab at BMM-> New Object ->Logical dimension.
    Any help

  • How to create count() measure for certain set of records in BMM Layer

    Hello all.
    I have a logical table like this one (Table AAA)
    Table AAA
    <p>
    --------------------------+<p>
    |       *Key*            |    *Name* |   <p>
    --------------------------+<p>
    |    1-2EMHS9     | AAA      |<p>
    --------------------------+<p>
    | 1-2EMWMO      | BBB      |<p>
    --------------------------+<p>
    |         NULL       |     CCC   |<p>
    --------------------------+<p>
    I need to calculate count() of records where <b>Key is not NULL</b>. In this example, this field must return coun() = 2.
    I suppose, CASE operator may help me with that, but I do not know for sure how to do this.
    Thank you for help,
    Alex.

    Thank you.
    But I must concretise my issue.
    I need to calculate number of records (e.g. order_id) that sutisfy appropriate condition (one of columns (e.g. loy_member_id) is set to null).
    I created logical column, that returns order_id if condition (loy_member_id is null) is met.
    Look at my logical column:
    Q Orders (LPM) - must return number of orders where loyalty_member_id is null.
    It has an expression:
    CASE  WHEN  NOT "Foxtrot (my) replica"."Sales Orders".LOY_MEMBER_ID IS NULL  THEN "Foxtrot (my) replica"."Sales Orders".ORDER_ID ELSE  NULL  END
    So, this returns order_id I need.
    But the question is how to count number of <b>order_id</b>'s returned by this column on BMM Layer.
    When I define my column with next expression:
    *<u>COUNT</u>(CASE WHEN NOT "Foxtrot (my) replica"."Sales Orders".LOY_MEMBER_ID IS NULL THEN "Foxtrot (my) replica"."Sales Orders".ORDER_ID ELSE NULL END)*
    I receive error:
    +[38083] The Attribute 'Q Orders LPM' defines a measure using an obsolete method.+
    Thank you,
    Alex.
    Edited by: Alex B on 3/3/2009 19:59

  • Rename columns in Presentation layer

    Hi Experts,
    I Have one BMM layer table with 2 groups columns like
    BMM Table
    Sales
    Revenue
    Sum
    Sales_ B Group
    Revenue_ B Group
    Sum_ B Group
    Now I want to show these columns in two tables i.e. A table and B table with same column names in presentation layer as below:
    Presentation A table Presentation B table
    Sales Sales
    Revenue Revenue
    Sum                     Sum          
    In BMM layer it should be Sales_ B Group but in presentation table it should show as Sales as vice verse for other 2 columns for B group columns
    If I rename Sales_ B Group as Sales in BMM layer it won’t accept because already sales column is there my requirement is in BMM layer in should as Sales_ B Group but in presentation layer the same column it should show as Sales .
    Regards,
    Rafi
    Edited by: Rafi.BI on Jan 31, 2013 11:28 PM

    Hi Rafi,
    Can you right click on your presenatation layer and create a new presentation table (EG: Table A) -- and then move the columns from bmm layer and rename them as per your req.
    Now right click again.. create one more Pres. table (EG: Table B) -- and then move the columns from bmm simply drag and drop and rename as per your req.
    Thank you.

  • How to resolve unresolved column error when we change column name in BMM Layer and removed alias in presentation layer

    how to resolve unresolved column error when we change column name in BMM Layer and removed alias in presentation layer

    Looks like the presentation column got Alias before your BMM changes, so in your case renaming logical column and deleting alias is not good to go.
    Keep Alias

  • How to determine the logical Keys of logical fact table in BMM layer?

    Hello guys
    I'd like to know more about how to know what columns of the logical fact table should be used as key in BMM layer. How OBIEE behaving differently when different keys are selected?
    In my situation, I have 1 fact table that physically joins to 20 dimensions in physical layer. Therefore, in physical layer, this fact table has about 20 foreign keys but no primary keys..
    In the logical layer, this fact table is logically joined to the same group of dimension tables. So in this case, how do I know what columns in logical fact table I should use as keys?
    Please advice
    Thanks

    thanks for the reply...
    The interesting thing I notice is that, when I start using fragmentation with the fact tables in its LTS, if not primary key is defined in the logical fact table, then I will be getting errors:
    [nQSError: 10058] A general error has occurred. [nQSError: 14023] None of the fact sources for columns are compatible with the detail filter []. (HY000)
    When I create the key by choosing random columns from the fact table as the logical key columns, this error goes way and the correct SQL is generated according to the frag..
    Because of such behavior, I'd really like to know how logical key really works in BMM layer.

  • Unable to create logical dimension in bmm layer

    Hi all,
    I am not able to create a logical dimension hierarchy in the bmm layer of the rpd.
    when I right click on the table I am not able to find the create logical dimension option in the popup window.
    could you please help me out in this?
    In the logical table we have data from sql statement also.
    Thanks!

    Create Dimensions is only available if the selected logical table is a dimension table (defined by 1:N logical joins) and no dimension has been associated with this table.
    To create a dimension automatically, the Administration Tool examines the logical
    table sources and the column mappings in those sources and uses the joins between physical tables
    in the logical table sources to determine logical levels and level keys.
    Hope you have defined the Logical join in BMM before looking for this option. If joins are not defined, this option won't come.
    Refer http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31770.pdf
    Page 133, Creating Dimensions Automatically
    Hope its useful

  • How to create logical fact table in BMM layer ?

    Hello,
    I have 3 Dimension table - 2 are in one schema and last is another schema. Using this 3 dimension tables, I need to create a logical fact table.
    So, my question is whether we can create this fact table by joining these 3 dimension table which are in 2 different schema s ?
    Thanks

    Fiaz,
    you are correct. We can use tables from different subject area to create a report. However, my question was related to rpd design. Sorry, I was not very clear about the queries earlier.
    Here is the whole scenario in the physical layer of the rpd
    Table name      Databse name      Connection pool name      Schema name
    AV          AV_PXRPAM     AVAILABILITY          CRMODDEV
    OUTAGE          AV_PXRPAM     AVAILABILITY          CRMODDEV
    COMPANY          PXRPAM          PXRPAM_POOL          CRMODDEV
    AV and OUTAGE have the joins already. I want to make a join between COMPANY with OUTAGE. And then I want to include a column from each of above tables to the logical fact table in the BMM layer. then I want to do a star schema with the logical fact table to the above 3 tables in the BMM layer.
    Thanks

  • Left outer join usage in obiee BMM layer

    Hi All,
    We lately started using left outer join in our bmm layer , to meet the requirement expectation .
    problem : We have two tables  Fact A , Dim B . There is an join int_id column to join them . Problem is... in table Dim B , we have 3 millions rows of Int_id and in fact table it is loaded for only data available(1 million rows).
    Due to this we are dropping rows  in the report ..as it is only getting data where fact.int_id = dim.int_id. So we used left outer join to solve to one particular report .(we know we can do ETl to load dummy int_id and make it null , but it is huge effort ..so we did left outer join)
    These days , same kind of reports are in requirement . if i keep on doing same left outer join to meet the requirement in BMM layer ? is there any disadvantages due to this ? any performance degrade due to this ? please throw few lines on left outer join and its usage ?
    Thanks,
    Sri

    Remodel your tables that might be a partition or any other way and follow in BI as per your new model.
    Simply: Go for ETL kind of solution

  • Drilldown in answers without creating dimensional hierarchy in BMM layer?

    Hello All,
    HELP! I have a main report like this:
    title: Region EAST (prompted field- user entered: North, South.... )
    heading: Departments Total Sales
    rows: Meat (01) 500,000.00
    Produce (02) 100,000.00
    Organic Items(03) 250,000.00
    Users wanted to ClLICK on either Meat, Produce or Organic Items field to get the detailed report on that particular dept. and would prefer to Click on the desired field than using department as a prompted field. :(
    I did try to use the navigate function on Departments column to get to the detail report, but the results came back with ALL departments. Is it possible to drill down in answers without creating the dimensional hierarchy in BMM layer? If so, please show me how to create the link that would navigate to the detailed report when users CLICK on desired department, ex: Meat (01)? BTW, detailed report may came from different resources (data is in the detailed table...) and I still need to pass the region variable to the detailed report.
    I really need a big help on this.
    Thanks All in advance!

    Hi Matt,
    thank you for looking into this problem.
    I did use the Navigate function on the 1st report, create a prompted filter on the depatment column (second report) but user can only click on the high lighted Department column header (on the first report) which navigated to the 2nd report and it displayed detail of all departments. Since users cannot click on a particular deptpartment, therefore I cannot pick up the value (01) for Meat department to pass thru the 2nd report. Is the Navigate function just works only when you click on the header column not on the data values in that column? do I need to set any other function to the department column on the 2nd report beside the filter?
    thanks for your help!

  • Problem with BMM layer warning messages.

    Hi,
    I have modelled with the following tables in BMM layer.
    Dimension tables: Regions,Countries,Departments, locations, Employees, jobs, job history
    Fact table: HR Facts (measured columns like salary, max salary, min salary, commission)
    The model is consistent with the following warnings:
    Logical dimension table REGIONS has a source REGIONS that does not join to any fact source.
    Logical dimension table DEPARTMENTS has a source DEPARTMENTS that does not join to any fact source.
    Logical dimension table COUNTRIES has a source COUNTRIES that does not join to any fact source.
    Logical dimension table LOCATIONS has a source LOCATIONS that does not join to any fact source.
    and also in the answers section (Presentation services) i could not able to view data, it's giving the following error (when i am trying to display REGION NAME field values)
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: REGIONS.REGION_NAME. Please fix the metadata consistency warnings. (HY000).
    I could not able to trace the problem where exactly is to be fixed.
    regards
    chandra kanth.

    Hi,
    Thanks for the information. Ideally that works out without any hierarchies. But the problem with which i was facing is somewhat different.
    Let me explain the problem scenario exactly:
    I have an employee, region tables in physical layer. Employee table has SALARY Column. Region table dont have any
    join with Employee table. In BMM layer i have created a fact table "HR Facts" and crated a logical fact column SALARY.
    The logical fact table source is Employee table. I have drag dropped Region table into BMM layer and joined with HR
    Facts table. While consistency check its given a warining message: Logical dimension table REGIONS has a source
    REGIONS that does not join to any fact source.
    What is the problem exaclty?
    regards
    chandra kanth.

  • Arranging Hierarchy tables in BMM layer

    Hi
    I have a different structure of dimensions in the database.
    Year->Season->Quarter->Month->Week
    For every level in Hierarchy I have table i.e, Dim_Year, Dim_Season, Dim_Quarter, Dim_Month, DIm_Week
    They are joined in physical layer in as per the hierarchy thats is Dim_Year is joined to DIm_Season by Year_id, Dim_Season is joined to Dim_Qaurter by Season id and so on.
    In BMM layer I have to craete an Hierrarchy.
    How should i keep these tables
    Option1: Pull the all the tables separately
    Create comples join between all the dim tables year->Season->Quarter->Month->Week
    Create hierarchy from these tables
    Option2:
    Create a logical tables as Time
    Pull all the tables into Time table with different Logical table sources.
    Then create a hierarchy from these tables.
    This will avoid the comples join in BMM layer
    Please suggest which option will lead to less performance issue and which is ideal approach in such scenarios.
    Thanks in Advance

    Hi,
    I am new to OBIEE but still I am suggesting one option....
    Drag and drop any one of the Time table (for ex Dim_Year) from physical layer to bmm layer. create a complex join of this table with the other tables in the bmm layer. then simply drag and drop the columns from other tables (Dim_Season, Dim_Quarter, Dim_Month, DIm_Week) from the physical layer one by one on the LTS of Dim_Year.
    Hope I haven't given you a funny answer.
    Edited by: user9149257 on Mar 8, 2010 9:20 PM

  • Filtering values in BMM layer

    Hi All,
    can we filter values or add filter condition for logical column in the BMM layer, i could see we can add where condition only in LTS of the logical table, i could see we could use FILTER display function but it can be used only with measure, i want to filter store values which is a dimension, is there any way round we could do this without creating any extra aliases and extra logical table.
    Thanks,
    Sreekanth
    Edited by: JUPS on Sep 6, 2010 6:21 PM

    hi,
    1)Create one session variable by writing a query in initialization block like
    select 'order' ,order_name from order_dim where order_name like '%Abc%'
    2) Variable to be row-wise-initialization
    3) In report pull order_name and click on Filter-->Advanced-->convert to sql
    give condition like
    SRC_ORDER_LINES.ORDER_ID = (VALUEOF(NQ_SESSION.order))
    Let me know if this doesn't work
    Thanks,
    Saichand.v

Maybe you are looking for

  • GL account balances by Profit Center

    Is there a transaction to extract GL account balances by Profit Center.  Something like this... Account No. 1   Profit Center A   $xxx Account No. 1   Profit Center B   $xxx Account No. 2   Profit Center A   $xxx Account No. 2   Profit Center B   $xx

  • Kernel Panic Lion 10.0.1 iMac GPU DumpGPURestart

    I posted the message below to the iMac forum - but it is clearly not a hardware problem, and also, clearly, a Lion 10.7.1 problem. I know this because I've now booted the same machine from my special Snow Leopard disk (I have it so I can run applicat

  • Lost two songs on my PC

    Two songs were lost on my PC iTunes library, but remain on my iPad.  Is there a way to transfer from the iPad library to the PC library?

  • Does the Inventory database clean itself?

    Scenario: NW 6.5 SP5 eDir 8.7.3.8 ZfD 6.5 SP2 Issue: Need to delete and reimport all wks in eDir. Details: All workstations are imported into eDir, and scanned by ZfD 6.5 Inventory services. A number of the wks are (due to historical reasons) importe

  • You don't have permission to access /pls/htmldb/htmldb on this server.

    I'm having issues installing htmldb on XP and on linux. I installed it on another XP box without issue, however I cannot get past this problem: You don't have permission to access /pls/htmldb/htmldb on this server. the FLOWS_010500 and FLOWS_FILES us