COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: benji41 on 05 Nov 2014 02:42:40 PM

Title: DMR and calculation with Time Relative Dimension
Post by: benji41 on 05 Nov 2014 02:42:40 PM
Dear all,

I'm using Cognos 10 Framework Manager and I need your help about a new measure calculation in my DMR View:

On my DMR view, I have :

- 2 measures [Nb Units] and [Unit Price]
- 1 calculated measure : Unit Price / Nb Units ([Avg Unit Price])
- 2 relative Time dimensions "YTD" and "YTD-1"

But, people wants this calculation measure on DMR view:

([Unit Price YTD] - [Unit Price YTD-1]) * [Avg Unit Price YTD-1]


How can I do that  ? Hope this can be possible...

Thanks a lot !
Title: Re: DMR and calculation with Time Relative Dimension
Post by: CognosAnalytics on 05 Nov 2014 06:48:50 PM
Hello Benji,
If I got your question correctly, you can always create a calculation in report studio.
(
tuple([Unit Price],[YTD])
-
tuple([Unit Price],[YTD-1])
)
*
tuple([Avg Unit Price],[YTD-1])

-Cognos810
Title: Re: DMR and calculation with Time Relative Dimension
Post by: benji41 on 06 Nov 2014 03:55:27 AM
Quote from: cognos810 on 05 Nov 2014 06:48:50 PM
Hello Benji,
If I got your question correctly, you can always create a calculation in report studio.
(
tuple([Unit Price],[YTD])
-
tuple([Unit Price],[YTD-1])
)
*
tuple([Avg Unit Price],[YTD-1])

-Cognos810

Thanks you very much !

For you, [YTD] corresponds the entire dimension ?

I need drag an drop it into a query calculation ?

Thanks a lot

Title: Re: DMR and calculation with Time Relative Dimension
Post by: CognosAnalytics on 07 Nov 2014 01:23:55 PM
Hello Benji,
Ideally what I have used and have seen in several other places, [YTD] , [YTD-1] are all members of a dimension. If you could attach a screenshot of your expanded dimension(the view that you see in report studio) that could give me more clarity. But Yes, if you have [YTD] etc as a members then you would create a data item/query calculation with the expression I provided below. We are using the TUPLE function to get your calculation, which will only accept members.

-Cognos810