OBIEE 10G count distinct problem

Hi,
I am really new to OBI now runs into this problem.
I have a fact and three dimension tables as follows:
fact:
1. sales:
sold_vlaue (sum)
transactions (count distinct receipt_id)
branch_id (foreign key)
daykey (foreign key)
receipt_id (foreign key)
product_key (foreign key)
dimensions
1. branch
branch_id (key)
2. time
daykey (key)
3. product
product_key (key)
These tables are joined as star schema by keys mentioned above. sales.sold_value is aggregated by 'sum', transactions is by (count distinct receipt_id). I don't have a dimension for receipt_id since it's only for the calculation of transaction.
So how can I set up to make the transactions correct (count distinct receipt_id)?
I tried to set transactions as count distinct in Default aggregation rule. But the result is wrong (all 1)

All right. I figured it out.
The fact table should be modelled as:
1. sales:
physical layer:
sold_vlaue
branch_id (foreign key)
daykey (foreign key)
receipt_id (foreign key)
product_key (foreign key)
The underlying query is:
select
branch_id, daykey, receipt_id, product_key
, sum(sold_value)
from table
group by
branch_id, daykey, receipt_id, product_key
BMM layer:
sold_value (sum)
transactions (count distinct receipt_id)
branch_id (foreign key)
daykey (foreign key)
receipt_id (foreign key) (removed)
product_key (foreign key)

Similar Messages

  • Select count distinct problem

    Hi,
    I have a tabe "M" that as messages, each message has a priority and is part of a departement. Now i wanted to create a report that count the number of messeges by departement group by priority and the total.............. something like this:
    Departement Priority1 Priority2 Priority3 Total
    A 1 2 3 6
    B 2 3 3 8
    C 1 1 1 3
    Can someboby help me please
    Than's
    Luis

    Unfortunately prior to 11g Oracle doesn't supply any means of creating cross tab queries, so any solution prior to 11g is going to rely on static views.
    However, if you don't mind having the data go down instead of accross you could use this:
    with m as (select 'high' priority, 'department A' department, 1 id_message from dual
      union all select 'medium', 'department A', 2 from dual
      union all select 'high',   'department B', 3 from dual
      union all select 'medium', 'department C', 4 from dual
      union all select 'high',   'department C', 5 from dual
      union all select 'medium', 'department B', 6 from dual
      union all select 'low',    'department A', 7 from dual
      union all select 'medium', 'department A', 8 from dual
      union all select 'low',    'department A', 9 from dual
      union all select 'high',   'department B', 10 from dual
      union all select 'low',    'department C', 11 from dual
      union all select 'medium', 'department C', 12 from dual
      union all select 'high',   'department B', 13 from dual
      union all select 'medium', 'department B', 14 from dual
      union all select 'medium', 'department B', 15 from dual
      union all select 'low',    'department B', 16 from dual
      union all select 'low',    'department C', 17 from dual
      union all select 'high',   'department C', 18 from dual
    select department, priority, count(id_message) from m
    group by rollup (department, priority)
    order by department, priority
    DEPARTMENT   PRIORITY COUNT(ID_MESSAGE)
    department A high     1
    department A low      2
    department A medium   2
    department A (null)   5
    department B high     3
    department B low      1
    department B medium   3
    department B (null)   7
    department C high     2
    department C low      2
    department C medium   2
    department C (null)   6
    (null)       (null)   18
    13 rows selectedor
    select department, priority, count(id_message) from m
    group by department, rollup (priority)
    order by department, priority
    DEPARTMENT   PRIORITY COUNT(ID_MESSAGE)
    department A high     1
    department A low      2
    department A medium   2
    department A (null)   5
    department B high     3
    department B low      1
    department B medium   3
    department B (null)   7
    department C high     2
    department C low      2
    department C medium   2
    department C (null)   6
    12 rows selected

  • OBIEE 10G Total by in answers not correct for count distinct fields. Is this a bug?

    For example:
    Sales fact has receipt no  and line no as key. It has data like:
    receipt no, line no, value
    1, 1, 30
    1, 2, 40
    2, 1, 10
    2, 2, 10
    There is also a transaction field defined as count distinct of receipt no (in BMM)
    In answers, I set to show Total.
    without any filters:
    receipt no, value, transactions
    1, 70, 1
    2, 20, 1
    total: 90, 2
    Transactions is 2, which is correct.
    If apply filter of transaction value greater than 50.
    Then transactions in total will still show 2
    1, 70, 1
    total: 70, 2
    Is this a bug? It looks only SUM works no problem in the total by.

    I did look at the physical query and saw how it calculated the Total transactions and it didn't take into account of the filter of transaction value greater than 50. Don't know why though. I don't know why you want to count line no. The result would be still 2.

  • Localization in OBIEE 10g(Error "start row is set higher than the row count

    Hi All,
    I m Working on Localization.
    I have used exteranize string and saved excel file and added language column and inserted data en and fr and loaded the file into the database.
    then i have created 2 variables
    one is for weblanguage SELECT 'VALUEOF(NQ_SESSION.WEBLANGUAGE)' FROM DUAL
    second is SELECT SESSION_VARIABLE, TRANSLATION FROM TAB_EXTERNAL WHERE LANGUAGE = 'VALUEOF(NQ_SESSION.LOCALE)' when i click on Test for the second variable it showing error
    "start row is set higher than the row count"
    i have seleted start row =10 and show some 10.then also it is showing same error.
    Please send me the solution ASAP.
    Thanks and Regards
    Kiran Kumar

    Hi Kiran,
    I am working in OBIEE localization. I created two variables and when press test i am getting vaules successfully. But in OBIEE application i am getting columns in english only. It seems there is some problem with values in DUAL table. It contains only 1 column called 'DUMMY' and value as 'X'.
    Please give me complete configuration steps to setup localization OBIEE 10g. Please drop me a mail to [email protected] if u have steps. I will call u if u provide contact number.

  • Alert if Update counts fail in Marketing segment tree in OBIEE 10G

    Hi
    I have a requirement to create alert if update counts fails in segment tree in marketing OBIEE 10G. If anyone can help, appreciated.
    Please send responses to [email protected] as well.

    For the benefit of other users:
    With help from Oracle support I was able to solve this error. The workaround is to populate Saved Results Set tab and QLI-Cache tabs completely.
    In our system we are not using any functionality associated with these tabs. Since Oracle suggested I had to do it !!!
    After populating these tabs the error didn't occur.
    --Joe                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Performance problem with more than one COUNT(DISTINCT ...) in a query

    Hi,
    (I hope this is the good forum).
    In the following query, I have 2 Count Distinct on 2 different fields of the same table.  Execution time is okay (2 s) with one or the other COUNT(DISCTINCT ...) in the SELECT clause, but is not tolerable (12 s) with both together in the query! I have
    a similar case with 3 counts: 4 s each, 36 s when together!
    I've looked at the execution plan, and it seems that with two count distinct, SQL server sorts the table twice before joining the results.
    I do not have much experience with SQL server optimization, and I don't know what to improve and how. The SQL is generated by Business Objects, I have few possibilities to tune it. The most direct way would be to execute 2 different queries, but I'd like
    to avoid it.
    Any advice?
    SELECT
      DIM_MOIS.DATE_DEBUT_MOIS,
      DIM_MOIS.NUM_ANNEE_MOIS,
      DIM_DEMANDE_SCD.CAT_DEMANDE,
      DIM_APPLICATION.LIB_APPLICATION,
      DIM_DEMANDE_SCD.CAT_DEMANDE ,
      count(distinct FAITS_DEMANDE.NB_DEMANDE_FLUX),
      count(distinct FAITS_DEMANDE.NB_DEMANDE_RESOL_NIV1)
    FROM
      ALIM_SID.DIM_MOIS INNER JOIN ALIM_SID.DIM_JOUR ON (DIM_JOUR.SEQ_MOIS=DIM_MOIS.SEQ_MOIS)
       INNER JOIN ALIM_SID.FAITS_DEMANDE ON (FAITS_DEMANDE.SEQ_JOUR=DIM_JOUR.SEQ_JOUR)
       INNER JOIN ALIM_SID.DIM_APPLICATION ON (FAITS_DEMANDE.SEQ_APPLICATION=DIM_APPLICATION.SEQ_APPLICATION)
       INNER JOIN ALIM_SID.DIM_DEMANDE_SCD ON (FAITS_DEMANDE.SEQ_DEMANDE_SCD=DIM_DEMANDE_SCD.SEQ_DEMANDE_SCD)
    WHERE
      ( ( DIM_MOIS.NUM_ANNEE_MOIS ) >201301
    GROUP BY
      DIM_MOIS.DATE_DEBUT_MOIS,
      DIM_MOIS.NUM_ANNEE_MOIS,
      DIM_DEMANDE_SCD.CAT_DEMANDE,
      DIM_APPLICATION.LIB_APPLICATION

    Here is the script, nothing original. Hope this helps.
    -- Fact table :
    -- foreign keys begin by FK_,
    -- measures to counted (COUNT DISTINCT) begin with NB_
    CREATE TABLE [ALIM_SID].[FAITS_DEMANDE](
        [SEQ_JOUR] [int] NOT NULL,
        [SEQ_DEMANDE] [int] NOT NULL,
        [SEQ_DEMANDE_SCD] [int] NOT NULL,
        [SEQ_APPLICATION] [int] NOT NULL,
        [SEQ_INTERVENANT] [int] NOT NULL,
        [SEQ_SERVICE_RESPONSABLE] [int] NOT NULL,
        [NB_DEMANDE_FLUX] [int] NULL,
        [NB_DEMANDE_STOCK] [int] NULL,
        [NB_DEMANDE_RESOLUE] [int] NULL,
        [NB_DEMANDE_LIVREE] [int] NULL,
        [NB_DEMANDE_MEP] [int] NULL,
        [NB_DEMANDE_RESOL_NIV1] [int] NULL,
     CONSTRAINT [PK_FAITS_DEMANDE] PRIMARY KEY CLUSTERED
        [SEQ_JOUR] ASC,
        [SEQ_DEMANDE] ASC,
        [SEQ_DEMANDE_SCD] ASC,
        [SEQ_APPLICATION] ASC,
        [SEQ_INTERVENANT] ASC,
        [SEQ_SERVICE_RESPONSABLE] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
     CONSTRAINT [AK_AK_FAITS_DEMANDE_FAITS_DE] UNIQUE NONCLUSTERED
        [SEQ_JOUR] ASC,
        [SEQ_DEMANDE] ASC,
        [SEQ_DEMANDE_SCD] ASC,
        [SEQ_APPLICATION] ASC,
        [SEQ_INTERVENANT] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_APPLICATION] FOREIGN KEY([SEQ_APPLICATION])
    REFERENCES [ALIM_SID].[DIM_APPLICATION] ([SEQ_APPLICATION])
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_APPLICATION]
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE] FOREIGN KEY([SEQ_DEMANDE])
    REFERENCES [ALIM_SID].[DIM_DEMANDE] ([SEQ_DEMANDE])
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE]
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE_SCD] FOREIGN KEY([SEQ_DEMANDE_SCD])
    REFERENCES [ALIM_SID].[DIM_DEMANDE_SCD] ([SEQ_DEMANDE_SCD])
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_DEMANDE_SCD]
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_INTERVENANT] FOREIGN KEY([SEQ_INTERVENANT])
    REFERENCES [ALIM_SID].[DIM_INTERVENANT] ([SEQ_INTERVENANT])
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_INTERVENANT]
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_JOUR] FOREIGN KEY([SEQ_JOUR])
    REFERENCES [ALIM_SID].[DIM_JOUR] ([SEQ_JOUR])
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_JOUR]
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE]  WITH CHECK ADD  CONSTRAINT [FK_FAITS_DEMANDE_DIM_SERVICE_RESPONSABLE] FOREIGN KEY([SEQ_SERVICE_RESPONSABLE])
    REFERENCES [ALIM_SID].[DIM_SERVICE] ([SEQ_SERVICE])
    GO
    ALTER TABLE [ALIM_SID].[FAITS_DEMANDE] CHECK CONSTRAINT [FK_FAITS_DEMANDE_DIM_SERVICE_RESPONSABLE]
    GO
    -- not shown : extended properties
    -- One of the dimension  tables (they all have a primary key named SEQ_)
    CREATE TABLE [ALIM_SID].[DIM_JOUR](
        [SEQ_JOUR] [int] IDENTITY(1,1) NOT NULL,
        [SEQ_ANNEE] [int] NOT NULL,
        [SEQ_MOIS] [int] NOT NULL,
        [DATE_JOUR] [date] NULL,
        [CODE_ANNEE] [varchar](25) NULL,
        [CODE_MOIS] [varchar](25) NULL,
        [CODE_SEMAINE_ISO] [varchar](25) NULL,
        [CODE_JOUR_ANNEE] [varchar](25) NULL,
        [CODE_ANNEE_JOUR] [varchar](25) NULL,
        [LIB_JOUR] [varchar](25) NULL,
        [LIB_JOUR_COURT] [varchar](25) NULL,
        [JOUR_OUVRE] [tinyint] NULL,
        [JOUR_CHOME] [tinyint] NULL,
     CONSTRAINT [PK_DIM_JOUR] PRIMARY KEY CLUSTERED
        [SEQ_JOUR] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    ALTER TABLE [ALIM_SID].[DIM_JOUR]  WITH CHECK ADD  CONSTRAINT [FK_DIM_JOUR_DIM_ANNEE] FOREIGN KEY([SEQ_ANNEE])
    REFERENCES [ALIM_SID].[DIM_ANNEE] ([SEQ_ANNEE])
    GO
    ALTER TABLE [ALIM_SID].[DIM_JOUR] CHECK CONSTRAINT [FK_DIM_JOUR_DIM_ANNEE]
    GO
    ALTER TABLE [ALIM_SID].[DIM_JOUR]  WITH CHECK ADD  CONSTRAINT [FK_DIM_JOUR_DIM_MOIS] FOREIGN KEY([SEQ_MOIS])
    REFERENCES [ALIM_SID].[DIM_MOIS] ([SEQ_MOIS])
    GO
    ALTER TABLE [ALIM_SID].[DIM_JOUR] CHECK CONSTRAINT [FK_DIM_JOUR_DIM_MOIS]
    GO

  • Problem in navigating from one report to another in OBIEE 10g

    Hi,
    I am facing an issue with OBIEE 10g while applying navigation on my reports.
    Lets suppose I made a report showing list of all items(in broad categories) sold on a particular day, say Dairy, Frozen Foods, Chocolates etc.In this report there is a date prompt showing the date of sale.
    Now there are certain items that are distributed within these categories, like dairy includes milk, cheese, butter etc.
    Hence, my navigation should be like when I click on a particular item category, the control should move on to the report which has all items under that particular category and the prompt for this report should show the same date as passed in the previous report.
    But sometimes what happens is that on clicking the navigation from first report to the second one, the date is not persisting in the prompt. I say sometimes because at times the navigation does work correctly. This is a bug of Obiee or something which is giving unexpected results.
    Kindly help with your suggestions.
    Thanks
    Ankita

    Ankita,
    This is not a bug in OBIEE...I'm sure something is missing. If this is working for some cases and not working for some other case then you will need to find the root cause. Try in bits and pieces...Step by Step with some dates (unit testing). Ideally this shud work properly.
    For an instance try with OBIEE drilldown feature and not with navigation with a single sale date and observe the behavior.
    Hope its clear...

  • Problem while installing Usage Tracking in OBIEE 10g

    Hi all,
    I am installing usage tracking in OBIEE for that created a database called usertracking using the sample tables provided in OBIEE 10g. everything is fine, but while configuring the NQSConfig.INI (like, PHYSICAL_TABLE_NAME   = "usertracking"."dbo"."S_NQ_ACCT" ; where usertracking is the database ) file I am getting the error called : Error 1067 : The process terminated unexpectedly.
    Please help me by your precious suggestions.
    Thanking you,
    Jagadeesha
    Edited by: Jagadeesh on Apr 15, 2012 9:55 PM

    Hi,
    Just keep it only below
    PHYSICAL_TABLE_NAME = "usertracking"."dbo"."S_NQ_ACCT" ;
    for example oracle default usage tracking setting in NQSconfig.ini file
    PHYSICAL_TABLE_NAME = "OBI Usage Tracking"."Catalog"."dbo"."S_NQ_ACCT";
    CONNECTION_POOL = "OBI Usage Tracking"."Usage Tracking Writer Connection Pool" ;
    For more info refer :
    http://obiee101.blogspot.com/2008/08/obiee-setting-up-usage-tracking.html
    http://www.obieetalk.com/obiee11g-setting-usage-tracking
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/biee/r1013/usage_tracking/usage_tracking.htm
    http://oraclebizint.wordpress.com/2007/08/14/usage-tracking-in-obi-ee/
    Thanks
    Deva

  • Count Distinct in Pivot table totals? OBIEE 11.1.1.5

    Hi,
    I have got a column that counts distinct customers per each month of the year and at the end of the analysis, it should show distinct customer count of the year as TOTAL. How can it be achieved? Is it possible to customize pivot table totals?
    Example:
    Month Customers
    Jan          10
    Feb          20 (10 new customers)
    Mar           15  (5 new customers)
    TOTAL: 25 (distinct values --> 10+10+5)Thanks in advance.

    Hi MK,
    I tried it already and it does not work. It takes the distinct value of each month, which is month's count distinct and then it sums. So the total is 45 (10+20+15) not 25.
    Thanks for you reply.

  • D2k report query , want to develop in obiee 10g

    Hi,
    I have a d2k report query, the result what i am getting in d2k report can i get the same result in obiee 10g.
    my query in d2k report auery is like :
    select a.vndr#,b.vndr_name,a.cust_type_cd,c.cust_type_e_dsct,a.branch_cd,d.branch_e_name,(sum(nvl(a.sales_total_value,0))-sum(nvl(a.return_total_value,0))) net_sales_value,count(distinct(a.cust#)) cust_count
    from cust_net_sales_tmp a,vendor b,cust_type_codes c,branches d where
    a.vndr#=b.vndr# and
    a.branch_cd=b.branch_cd and
    a.cust_type_cd = c.cust_type_cd and
    a.cust_type_cd between :f_ctype and :t_ctype
    group by a.vndr#,b.vndr_name,a.cust_type_cd,c.cust_type_e_dscr,a.branch_cd,d.branch_e_name
    order by a.vndr#,a.cust_type_cd,a.branch_cd
    thank you.
    please suggest..

    Hi,
    The presentation variable is being passed correctly, but still the date value is not persisiting.
    I have two prompts, both having presentation variables passed into them;One of the prompt value is being persisted but the other one(here date) is not.
    I am not able to justify this issue as the problem is very vague. I dont see any reason for this issue to come up.
    Anyways I am still trying to figure out the problem.
    Regards
    Ankita

  • OBIEE 10g Getting wrong results when adding calculated columns to a report

    Hi,
    I'm experiencing a possible misbehaviour with OBIEE 10g (10.1.3.4.1).
    I have a simple report with a table. Columns are simply selected from dimensions and facts. In this case the generated query is:
    WITH
    SAWITH0 AS (select sum(T30604.TOTAL_TIME) as c1,
    sum(T30604.MATERIALS_QTT_COST) as c2,
    sum(T30604.AMNT) as c3,
    sum(T30604.QNTY) as c4,
    T30622.BRANCH_CODE as c5,
    T25064.SRP1_CODE as c6,
    T25064.SRP1_DESC as c7,
    T25064.SRP2_CODE as c8
    from
    THK_BRANCHES T30622,
    THK_ITEMS T25064,
    THK_INVENTORY_TRANSACTIONS T30604
    where ( T25064.ITEM_ID = T30604.ITEM_ID and T30604.BRANCH_ID = T30622.BRANCH_ID )
    group by T25064.SRP1_CODE, T25064.SRP1_DESC, T25064.SRP2_CODE, T30622.BRANCH_CODE)
    select distinct SAWITH0.c5 as c1,
    SAWITH0.c6 as c2,
    SAWITH0.c7 as c3,
    SAWITH0.c8 as c4,
    SAWITH0.c4 as c5,
    SAWITH0.c3 as c6,
    SAWITH0.c2 as c7,
    SAWITH0.c1 as c8,
    SAWITH0.c4 as c9,
    SAWITH0.c3 as c10,
    SAWITH0.c2 as c11,
    SAWITH0.c1 as c12,
    SAWITH0.c4 as c13,
    SAWITH0.c3 as c14,
    SAWITH0.c2 as c15,
    SAWITH0.c1 as c16,
    SAWITH0.c4 as c17,
    SAWITH0.c3 as c18,
    SAWITH0.c2 as c19,
    SAWITH0.c1 as c20
    from
    SAWITH0
    Results of this report / query are correct.
    I then add a simple calculation (subtraction between two fields). The generated query is:
    WITH
    SAWITH0 AS (select sum(T30604.MATERIALS_QTT_COST) as c1,
    sum(T30604.AMNT) as c2,
    T30622.BRANCH_CODE as c3,
    T25064.SRP1_CODE as c6,
    T25064.SRP1_DESC as c7,
    sum(T30604.TOTAL_TIME) as c8,
    sum(T30604.QNTY) as c11,
    T25064.SRP2_CODE as c12
    from
    THK_BRANCHES T30622,
    THK_ITEMS T25064,
    THK_INVENTORY_TRANSACTIONS T30604
    where ( T25064.ITEM_ID = T30604.ITEM_ID and T30604.BRANCH_ID = T30622.BRANCH_ID )
    group by T25064.SRP1_CODE, T25064.SRP1_DESC, T25064.SRP2_CODE, T30622.BRANCH_CODE),
    SAWITH1 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6,
    D1.c7 as c7,
    D1.c8 as c8,
    D1.c9 as c9,
    D1.c10 as c10,
    D1.c11 as c11,
    D1.c12 as c12
    from
    (select sum(SAWITH0.c1) over (partition by SAWITH0.c3) as c1,
    sum(SAWITH0.c2) over (partition by SAWITH0.c3) as c2,
    SAWITH0.c3 as c3,
    sum(SAWITH0.c1) over (partition by SAWITH0.c6, SAWITH0.c3) as c4,
    sum(SAWITH0.c2) over (partition by SAWITH0.c6, SAWITH0.c3) as c5,
    SAWITH0.c6 as c6,
    SAWITH0.c7 as c7,
    sum(SAWITH0.c8) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c8,
    sum(SAWITH0.c1) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c9,
    sum(SAWITH0.c2) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c10,
    sum(SAWITH0.c11) over (partition by SAWITH0.c6, SAWITH0.c12, SAWITH0.c3) as c11,
    SAWITH0.c12 as c12,
    ROW_NUMBER() OVER (PARTITION BY SAWITH0.c3, SAWITH0.c12 ORDER BY SAWITH0.c3 ASC, SAWITH0.c12 ASC) as c13
    from
    SAWITH0
    ) D1
    where ( D1.c13 = 1 ) ),
    SAWITH2 AS (select sum(T30604.MATERIALS_QTT_COST) as c1,
    sum(T30604.AMNT) as c2
    from
    THK_INVENTORY_TRANSACTIONS T30604)
    select SAWITH1.c3 as c1,
    SAWITH1.c6 as c2,
    SAWITH1.c7 as c3,
    SAWITH1.c12 as c4,
    SAWITH1.c11 as c5,
    SAWITH1.c10 as c6,
    SAWITH1.c9 as c7,
    SAWITH1.c8 as c8,
    SAWITH1.c10 - SAWITH1.c9 as c9,
    SAWITH1.c11 as c10,
    SAWITH1.c10 as c11,
    SAWITH1.c9 as c12,
    SAWITH1.c8 as c13,
    SAWITH1.c11 as c15,
    SAWITH1.c10 as c16,
    SAWITH1.c9 as c17,
    SAWITH1.c8 as c18,
    SAWITH1.c11 as c20,
    SAWITH1.c10 as c21,
    SAWITH1.c9 as c22,
    SAWITH1.c8 as c23,
    SAWITH1.c5 as c26,
    SAWITH1.c4 as c27,
    SAWITH1.c2 as c28,
    SAWITH1.c1 as c29,
    SAWITH2.c2 as c30,
    SAWITH2.c1 as c31
    from
    SAWITH1,
    SAWITH2
    Results of this report / query are wrong: it seems as if some rows "disappear".
    If I delete the filter in SAWITH1 query above ( D1.c13 = 1 ) results are correct.
    Anyone experiencing the same problem? The strange thing is that I have a number of similar reports (on other subject areas) and everyting is working fine.
    Please also note that I don't want to add this kind of calculated items in the RPD (they can be simple calculations that are made on-the-fly).
    Any help would be greatly appreciated.
    Thanks a lot and regards,
    Cristina

    I have the same issue, everything OBIEE server generate query using ROW_NUMBER() over () function, it will hardcode Dx.cx = 1, this will cause issue if you have rows of the same distinct value, thus causing missing rows and the final results will be wrong.
    I have open a SR with Oracle Support since March 2011, but till today, they have not resolve the issue yet.
    Hope they solve the issue soon.
    Best Regards
    KT

  • Set Aggregation type of Count Distinct to use correct table aggregation in

    Hi there,
    Currently I use OBIEE 10.1.3.4.1 , and there is a case where a fact table consist of 2 logical table source: detail and aggregate table, which has some measure using count distinct as aggregation type. The problem is everytime I browse the measure with no dimension at all , it always use detail table not aggegation one..
    Really appreciate for any suggestion ..
    thanks a lot

    Hi,
    I don't think it's the same case as mine. Let say I have 2 table : detail and aggegate
    Detail Table consists 4 fields:
    *) Period
    *) Market
    *) Region
    *) Measure : Customer ID, Sales
    Aggregate Table consists 3 fields :
    *) Period
    *) Region
    *) Measure : Customer ID, Sales
    in the measure I set aggregation type for each field:
    *) Sales >> set as Sum
    *) Customer ID >> copy as "Number of Customer" and set as Count Distinct
    In each LTS' contents I set the level of aggregation using "Get Levels" feature..
    Then I try to browse via Presentation and do some querys belows:
    a) only choose single field of measure : Sales, the session shows that the value is taken from aggregation table and just as I expected.
    b) choose period and sales, the session shows that the values are taken from aggregation table, and still just as I expected.
    c) choose period, sales , and market, the session shows that the values are taken from detail table, just as I expected.
    d) only choose single field of measure : "Number of Customer", the session shows that the value is taken from detail table , this is NOT as I expected. It suppose to take the value from aggregation table..
    e) choose period and "Number of Customer", the session shows that the value is taken from detail table , this is also NOT as I expected. It suppose to take the value from aggregation table..
    I've tried to override the aggregation , but still confuse how to apply in measure "Number of Customer" and did not work at all..
    any idea ?
    thanks a lot

  • Count&Count Distinct

    Hi Gurus,
    In one of OBIEE blogs I studied "Aggregation should only be performed on measure columns, with the possible exception of the aggregation COUNT and Count Distinct"....my Question is what happens if we apply count&count distinct aggregation rules to measures because we are using that in our project,what are problems we will face?

    User wrote:
    you mean it executes a sub query internally to count and later it sum the result..correct.- You can ship the total calculations to the underlying RDBMS if 'Report Based Total' is not ticked, otherwise if it is, the BI Server computes the subtotal.
    and in your answers "No" mean results coming by putting sum in criteria are different ..right- Yes thats what I mean, sorry if unclear - Are your totals correct now? Failing that try 'server complex aggregate' but this is usually only requried if your deriving calculations in Answers (ie % of total etc).

  • Oracle 11g database & OBIEE 10g user id case sensitivity

    Hi,
    Previously we used to point OBIEE to 10g database and the following query used to return data. But now we have database upgraded to 11g R2. Is there a way to make the 11g R2 database case insensitive and make the following query return results? Here when EMP_LOGIN = upper(bmiller) query is working, but not when EMP_LOGIN = bmiller.
    select T32660.X_DISTRICT as c1,
    count(distinct case when T32385.OPTY_WID > 0 then T32385.OPTY_WID end ) as c2
    from
    W_POSITION_H T37785 /* Dim_W_POSITION_H */ ,
    W_POSITION_D T36585 /* Dim_W_POSITION_D */ ,
    W_EMPLOYEE_D T32660 /* Dim_W_EMPLOYEE_D */ ,
    W_OPTY_D T31547 /* Dim_W_OPTY_D */ ,
    W_ORG_D T31796,
    W_REVN_F T32385 /* Fact_W_REVN_F */
    where ( T32385.PR_TEAM_POS_WID = T36585.ROW_WID
    and T31547.ROW_WID = T32385.OPTY_WID
    and T31796.ROW_WID = T32385.PR_ACCNT_WID
    and T32385.PR_TEAM_EMP_WID = T32660.ROW_WID
    and T36585.ROW_WID = T37785.SUB_POSITION_WID
    and T37785.EMP_LOGIN = upper('bmiller')
    and T37785.EMP_LOGIN = 'bmiller' )
    group by T32660.X_DISTRICT
    order by c1
    Thanks
    MNRK

    If this query was working in the old system, my assumption is that something was changing your session's NLS_COMP to Linguistic. If OBIEE isn't issuing that ALTER SESSION in a login script, the next most likely scenario would be a login trigger that was issuing the ALTER SESSION when the OBIEE user logged in. That trigger would have remained in place had you used the DBUA to upgrade. If you did an export and import, however, it's possible that you didn't export the login trigger.
    Justin

  • OBIEE 10G SSO Issue

    HI
    We have configured OBIEE 10g on IIS (ver-6) server. We have a business requirement where we need to integrate OBIEE with another ASP.NET application. So, user should log in once and to view OBIEE reports he should not log in again.
    Now we have checked GO URL option given in Chapter 11 of Oracle® Business Intelligence Presentation Services Administration Guide. But problem is our company policy does not allow us to pass Password in HTTP URL. So we cannot use that solution.
    We are trying to use SSO and referred to Chapter 8 of Deployment Guide. We followed all the steps give in that chapter
    Also, we modified isapiconfig.xml and entered <CredentialStore> paramaters in it.
    But when we Go to Analytics URL (for remote machine) Login screen show "Not Logged In" message.
    currently we are using REMOTE_USER method as it is given in documention.
    So we did everything by the book. Now my question is:
    1) We do not have any SSO server/Product, is there is any way we can integrate OBIEE application to other ASP.Net application on another IIS SERVER? There was a suggestion that if we pass remoter_user parameter in HTTP header, is it possible to work this way.
    2) Is it possible that if we host both the ASP.NET and OBIEE 10g on SAME IIS server there is way to integrate them using SSO without any SSO server again by passing remote_user HTTP header
    3) What options do we have to integrate ASP.NET application and OBIEE without using SSO server itself and without using GO url method as we cannot pass password in header. Will Cookie Enabling Method can work in this scenerio.
    4) Is there is way that OBIEE directly take windows ID without SSO server, I know question might sound stupid as in prerequisite i read that we need “SSO system of Choice” but we need to be absolutely sure about our option and possibilities.
    we also reffered to following thread:
    10g - how to configure sso with iis-
    But, this one seems to be unresolved So kindly help
    Regards
    Saurabh

    Hi Praveen,
    Thanks for your response. I was doing a bit of R&D on SOAP API, tell me if i am wrong.
    In case we use SOAP API to Authenticate then we will get Response in terms of XML and we have to write our own code to render it in tables or charts.
    We dont want that we just want to automate the Authentication part and want to use OBIEE use Interactive Dashboards. Kindly suggest if I am wrong and if we just write a piece of Code to get the Authentication done and it will not affect the further use of OBIEE.
    Regards
    Saurabh

Maybe you are looking for

  • How do I mirror from windows PC to multiple ipads at the same time?

    Work in a band.  Band uses a Windows 7 PC and I need to mirror that screen to at least two, and up to four, ipad screens for other band members.  The ipads only need to mirror the PC screen.  They do not need to have any control or influence over the

  • Syntax error in a query

    Hello all I have a query, and i got this error , any idea ? Error starting at line 1 in command: WITH continent_table  AS SELECT     en.country,en.continent         ,ROW_NUMBER() OVER (PARTITION BY en.country ORDER BY en.percent DESC) ran      FROM  

  • Question about moving music from an iPod to your computer.

    In my household, we have iTunes on three different computers. My mother downloaded music on my brother's computer, and it's on his library. We want to burn a cd with the purchased album, but his computer does not have a cd burner, but the other two d

  • Sql Like statement

    how can i get all records starting with % ?

  • Alternate Fiscal Year End in New GL

    Environment: ECC 6.0 - New GL + Document Splitting All Co Codes book to 0L leading ledger and one Controlling Area. We have one more company code (lets say 1000) with a Alternate Fiscal Year than other company codes. The solution of a Non Leading Led