COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: agebre on 11 Sep 2006 05:21:56 PM

Title: Calculate Rate
Post by: agebre on 11 Sep 2006 05:21:56 PM
I have one query item in my report: MEMBER STATUS. MEMBER STATUS have 'ACTIVE' and INACTIVE' values.

I am trying to display ACTIVE MEMBER RATE in my report. (ACTIVE MEMBER RATE = count of only ACTIVE members/Count of ACITIVE and INACTIVE members).

I am trying to do something like this ...(COUNT (MEMBER STATUS) When MEMBER STATUS = 'ACTIVE') / COUNT (ALL MEMBER STATUS).

Does anybody know how I can do this?

Thanks,
Ambex
Title: Re: Calculate Rate
Post by: Blue on 13 Sep 2006 12:40:56 PM
Try creating another item in the query:

IF (MEMBER STATUS='ACTIVE') THEN (1) ELSE (0) and call it ACTIVE STATUS

Set the aggregation rule on this and the MEMBER STATUS item to COUNT. This will give you only one row with 2 numbers - the count of members and the count of active members.

On the page create a layout calculation something like ACTIVE STATUS / MEMBER STATUS.  This will create a third item on the row which is the percentage of active members.

Hope that helps.  :)

Blue