COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: sergiord2016 on 14 Jul 2017 03:49:56 PM

Title: Fact table with two date columns , relation with date dimension
Post by: sergiord2016 on 14 Jul 2017 03:49:56 PM
Hello ,

I have a fact table with two date columns and i want to get an indicator depending on each date.

For example on 14 of July ,  for date column1 , the sum of the kpi is 3.000€ but is 2.000 for column2 because the dates are different between both date columns...

I don't know how to do this on COGNOS...

One way could be to add another date column on the dimension ... and link the column2 to that new column on the dimension...

Thanks in advance my friends.
Title: Re: Fact table with two date columns , relation with date dimension
Post by: bus_pass_man on 14 Jul 2017 05:04:50 PM
You haven't been that clear about what you're up against but it looks like a role-playing situation. 

Those two columns are, presumably keys of some sort.  For example, a sales date key and a ship date key.

If it is role-playing you might want to look at the cognos samples for an example of that via the use of aliases.

Before doing anything, try to define the problem so that it can be classified as something that belongs to some known pattern. 

hope that helps
Title: Re: Fact table with two date columns , relation with date dimension
Post by: sergiord2016 on 16 Jul 2017 12:14:07 PM
Quote from: bus_pass_man on 14 Jul 2017 05:04:50 PM
You haven't been that clear about what you're up against but it looks like a role-playing situation. 

Those two columns are, presumably keys of some sort.  For example, a sales date key and a ship date key.

If it is role-playing you might want to look at the cognos samples for an example of that via the use of aliases.

Before doing anything, try to define the problem so that it can be classified as something that belongs to some known pattern. 

hope that helps

Yes its a role playing problem

Your example (ship date and sales date) is similar to what i am facing...

How can and analyze over the two dates?
Title: Re: Fact table with two date columns , relation with date dimension
Post by: bus_pass_man on 16 Jul 2017 07:41:39 PM
By analyze, do you mean create a report which involves both dates?  Use the samples as a guide.  Create aliases for each role and assign a relationship between each and the fact table.  That will ensure that there's only one possible way the sql can be generated for any alias.

Do you mean analyze the generated SQL?   If so, try the query information tab in FM and the generated sql functionality in report studio.
Title: Re: Fact table with two date columns , relation with date dimension
Post by: sergiord2016 on 18 Jul 2017 04:38:21 AM
Report that involves both dates...

Thank you i will follow the samples...