COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => BI Modeling (Transformer) => Topic started by: cogSteve on 21 Nov 2011 01:23:11 PM

Title: Relative Time category (custom/calculated)
Post by: cogSteve on 21 Nov 2011 01:23:11 PM
Hi -- I'm attempting to create a calculated category in Transformer and banging my head a bit.

What I need is a calculated member on date dimension that will provide users with an annualized # depending on current period (mth of year). Something like: (measure rolled up to current mth / # of mths thus far this year) * 12.

I've started to create the calc category in Transformer category diagrammer, can bring in required categories for calc, but the function list is so bare bones I'm not seeing how to dynamically bring in # of mths (ie. count of mth categories) to make this calculation work ... 

thoughts?,
cheers,
Steve
Title: Re: Relative Time category (custom/calculated)
Post by: pricter on 21 Nov 2011 01:36:39 PM
Instead of create a calculate member have you think of the option to create a calculate measure?

Just create a "count of months" and the a calculate measure such as

(your measure /  "count of months" ) * 12

Title: Re: Relative Time category (custom/calculated)
Post by: cogSteve on 25 Nov 2011 02:14:45 PM
yep, thx, pricter. Got this working as a calculated measure. Which brings up a question to me?? What is the decision criteria for creating the calc measure within the src (ie. FM QS/report) or in Transformer. Transformer function lists for doing stuff like this seem very limited??

thx guys, great forum,
Steve

Title: Re: Relative Time category (custom/calculated)
Post by: bdbits on 29 Nov 2011 01:56:03 PM
I am generally in favor of putting calculations in the FM model, as someday there will be a use for it not related to a cube (perhaps a DMR) or maybe across multiple cubes. Might as well allow for the possibility up front. The further down you push it, the more re-usable it is going to be, and re-use promotes consistency.
Title: Re: Relative Time category (custom/calculated)
Post by: cognostechie on 29 Nov 2011 04:26:24 PM
Quote from: cogSteve on 25 Nov 2011 02:14:45 PM
yep, thx, pricter. Got this working as a calculated measure. Which brings up a question to me?? What is the decision criteria for creating the calc measure within the src (ie. FM QS/report) or in Transformer. Transformer function lists for doing stuff like this seem very limited??

thx guys, great forum,
Steve

If you have to create a calculation that involved 2 or more data sources within Transformer, then you create the calculation in Transformer, otherwise I prefer to do it in FM or the Data Mart.