Page 1 of 1

How do I work out the median?

Posted: Tue Jul 29, 2008 10:10 am
by r-z-r.ru_ledusy
I_m writing a report in Report Writer to get various appeal analysis details _ no of responses, average donation etc., which is all fine. However one of the requirements is the median amount of the appeal. I can work out easily what the median number is _ i.e. if we have 40 responses the median number is 20. What I can_t work out and don_t know if it_s possible in Report Writer, is how do I then find out what the amount is that the 20th record in the output gave to the appeal (assuming the report records are sorted on AMOUNT ascending).

==> How do I work out the median?

Posted: Wed Jul 30, 2008 7:28 am
by r-z-r.ru_ledusy
Thank you very much Kathleen - I^ll give it a go.

=> RE: How do I work out the median?

Posted: Wed Jul 30, 2008 10:26 am
by kfleming
Create two total fields that count response and reset when the appeal changes. Make the second one pre-processed.____The create a calculated field with the expression:____IIF(running=round(count/2,0),amount,0)____where running is the running total and count is the pre-processed total.____Finally create a total that sums the calculated field, accumulates for each record and resets by appeal.____I think this should get you there.____Kathleen__R&R Support

===> RE: How do I work out the median?

Posted: Fri Aug 01, 2008 11:52 am
by r-z-r.ru_ledusy
Works a treat - thank you Kathleen