COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rishipopat on 19 Aug 2012 04:49:30 PM

Title: Running Difference in Cognos
Post by: rishipopat on 19 Aug 2012 04:49:30 PM
I need to create a running difference(difference of the current row and its previous row) for each row in a table/crosstab. Please let me know what is the best way to implement it in Report Studio

Thanks
Title: Running Difference in Cognos
Post by: MFGF on 19 Aug 2012 11:41:20 PM
Ummmm.... You might try using the running-difference summary in a query calculation? Is this a cross tab based on a relational package or a dimensional package? If it's relational, it should work ok, but we may need to get more inventive for a dimensional source.

Cheers!

MF.

Sent from my iPad using Tapatalk HD
Title: Re: Running Difference in Cognos
Post by: rishipopat on 20 Aug 2012 06:52:40 AM
I believe this is a dimensional package. Any suggestions?
Title: Re: Running Difference in Cognos
Post by: CognosPaul on 20 Aug 2012 07:05:13 AM
What is the comparison against? Time dimension?

try doing something like:
[Measure] - tuple([Measure],prevMember(currentMember([Cube].[Tim Dimension].[Time Hierarchy])))