Details
-
Type: New Feature
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7
-
Fix Version/s: 4.7
-
Component/s: CiviContribute
-
Labels:None
-
Documentation Required?:User and Admin Doc
-
Funding Source:Paid Issue Queue
Description
Add two new calculated summary values for search results to 'results' block in Find Contributions for 'Mode Amount' and 'Median Amount'. These values would be displayed in addition to the currently displayed "Total Amount", "# Completed Contributions", and "Avg Amount").
The "median" is the "middle" value in the list of numbers when they are ordered by value. For even count sets, median is average of the two middle values.
The "mode" is the value that occurs most often. If no number is repeated, then there is no mode for the list. Display 'N/A' in that case.
Shorten the display labels as shown in the attached screenshot to accommodate all stats in a single row.
NOTE: Please discuss median and mode calculation options with Tim. If we are calculating in MySQL it may be helpful to check out the functions referenced here: http://www.xarg.org/2012/07/statistical-functions-in-mysql/
NOTE: If the site supports > 1 currency, amounts are displayed for each currency (as currently done for Total Amount and Avg Amount). The new calculated values would need to be rendered on a separate row - probably move Avg Amount to that row as well since it's related.