COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: anilkumar on 20 Jan 2010 06:31:39 AM

Title: current day previous day and difference
Post by: anilkumar on 20 Jan 2010 06:31:39 AM
Hi

iam  using dimensional data , cubes as a source,

i need to create current day, previous day and difference(current day- previous day)

bother are in different hierarchy.

Thanks & Regards
ANIL K .MARRI

Title: Re: current day previous day and difference
Post by: MFGF on 20 Jan 2010 06:42:17 AM
Hi,

These really need to be from the same hierarchy.  Try the following:

1. Add a Query Calculation - call it Current Day - with the expression closingPeriod([Day level from your time hierarchy])
2. Add a second Query Calculation - call it Previous Day - with the expression lag(closingPeriod([Day level from your time hierarchy]),1)
3. Add a third Query Calculation - call it Difference - with the expression [Current Day] - [Previous Day]

MF.
Title: Re: current day previous day and difference
Post by: anilkumar on 23 Jan 2010 12:56:29 AM
Hi MFGF

Thank you very very much,   spending  u  r precious time  for all.

i need this from different Hierarchy



Thanks & Regards
ANIL K .MARRI
Title: Re: current day previous day and difference
Post by: MFGF on 25 Jan 2010 06:17:48 AM
Are you on v8.4?

MF.
Title: Re: current day previous day and difference
Post by: anilkumar on 30 Jan 2010 05:12:40 AM
Hi MFGF

8.3 v

Thanks& Regards
Anil k .marri
Title: Re: current day previous day and difference
Post by: MFGF on 01 Feb 2010 06:17:51 AM
Hi,

Unless you are on 8.4, you cannot bring in members from different hierarchies within the same dimension.  This was added as an enhancement to the product for the 8.4 release.  You either need to upgrade, or use MDX functions (closingPeriod, lag) to achieve the desired result from a single hierarchy.

MF.