Author Topic: Calculate Rate  (Read 591 times)

Offline agebre

  • Associate
  • **
  • Posts: 2
  • Forum Citizenship: +0/-0
Calculate Rate
« on: 12 Sep 2006 04:21:56 am »
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

Offline Blue

  • Global Moderator
  • Community Leader
  • *****
  • Posts: 189
  • Forum Citizenship: +13/-0
  • The Earth is one country ... Baha'i Faith
    • Robert Edis Consulting
Re: Calculate Rate
« Reply #1 on: 13 Sep 2006 11: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
Robert Edis
Principal (and principled)
Robert Edis Consulting
Chicago USA