How do I work out the median?

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
r-z-r.ru_ledusy
Posts: 0
Joined: Wed Feb 21, 2018 4:52 pm

How do I work out the median?

Post by r-z-r.ru_ledusy » Tue Jul 29, 2008 10:10 am

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).

r-z-r.ru_ledusy
Posts: 0
Joined: Wed Feb 21, 2018 4:52 pm

==> How do I work out the median?

Post by r-z-r.ru_ledusy » Wed Jul 30, 2008 7:28 am

Thank you very much Kathleen - I^ll give it a go.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

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

Post by kfleming » Wed Jul 30, 2008 10:26 am

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

r-z-r.ru_ledusy
Posts: 0
Joined: Wed Feb 21, 2018 4:52 pm

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

Post by r-z-r.ru_ledusy » Fri Aug 01, 2008 11:52 am

Works a treat - thank you Kathleen

Post Reply