COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: bloggerman on 05 Sep 2011 02:45:14 PM

Title: Ambiguous Fact table
Post by: bloggerman on 05 Sep 2011 02:45:14 PM
I have a fact table which has about 10 joins in it. fact table is on the 1 side of the relation for about 4 and on the n side for the other 6. How do you handle modeling for such a scenario.
Title: Re: Ambiguous Fact table
Post by: MFGF on 07 Sep 2011 05:11:47 AM
When you refer to joins, do you mean joins within embedded SQL retrieving data into the fact query subject, or do you mean relationships linking the fact query subject to other things in the model?

MF.
Title: Re: Ambiguous Fact table
Post by: bloggerman on 14 Sep 2011 10:17:13 AM
The later. Query Subject joining with other query subjects
Title: Re: Ambiguous Fact table
Post by: bloggerman on 16 Sep 2011 04:15:02 PM
Anyone?? It is crucial
Title: Re: Ambiguous Fact table
Post by: Arpitagrawal9 on 20 Sep 2011 04:59:52 AM
what kind of realationship the table has with the dimensions is it all one to many
Title: Re: Ambiguous Fact table
Post by: blom0344 on 20 Sep 2011 09:51:35 AM
Very tricky issue.  If you have a model with 2 query subjects that contain both facts and are directly joined then Cognos only manages to generate correct result from the 1 side if a unique determinant is set for that query subject.
Cognos then introduces the following syntax:


XSUM(subject1.measure1 at subject1.uniquekey  for subject1.uniquekey)


without the determinant:


XSUM(subject1.measure1   for subject1.uniquekey)


Which leads to oversummarizing based on the cardinality with the n-side

When you add other attributes from dimensional tables you will notice these are added to the XSUM syntax
Title: Re: Ambiguous Fact table
Post by: cognostechie on 20 Sep 2011 01:54:34 PM
Beg to differ Blom !! I had earlier posted screenshots of two query subjects directly joined to each other with 1:Many relationship and the report showed correct aggregation from both query subjects. If you remember, we had an elaborate discussion on this.
Title: Re: Ambiguous Fact table
Post by: blom0344 on 20 Sep 2011 02:01:07 PM
Yes I remember. I therefore build  a little testmodel and my contribution was based on the outcome of the appliance of the determinant. SQL generated is different and results are only correct with determinant in place