COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: AnotherCOG on 15 Jun 2011 02:25:22 PM

Title: Multiple Last Statement Transitions from MSAccess to C8
Post by: AnotherCOG on 15 Jun 2011 02:25:22 PM
I am developing within report studio for C8 (transitioning reports from MS Access)and I have the following question(s).

Within the MS Access report I was using Last for 3 fields in relation to a listing of customer numbers. 
Last $ amt taken, last id of person to speak with customer, and last person(name) to speak with x customer number.
I need to make it so C8 will show the last person, id and $ amt taken without repeating information as the same customer could be spoken with multiple times on the same day.

Other date fields include: $ amt taken date = sysdate -1 and account expiration date <sysdate -2.

I have tried using maximum for these fields but only get repeating figures  for the $ amt taken etc..as it is pulling in the maximum amt taken.

Any help in how to a last distinct customer number listing within C8 is appricated.


Thank you,

AnotherCOG


Title: Re: Multiple Last Statement Transitions from MSAccess to C8
Post by: RobsWalker68 on 16 Jun 2011 03:06:36 AM
Hi

Have a look at using the 'For' keyword to give your summaries some scope

As an example to work out the maximum amount taken on a given day the calculation would be:

Maximum([Amount] for [amount taken date])

Rgds


Rob
Title: Re: Multiple Last Statement Transitions from MSAccess to C8
Post by: blom0344 on 16 Jun 2011 02:59:07 PM
What you basically need is an OLAP style function like 'rank' to organize your data and be able to apply an after aggregation filter to select out the proper values. Do a search on 'rank' on these forums and you will get the idea..