Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Median by month in a matrix Expand / Collapse
Author
Message
Posted Monday, May 6, 2013 3:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 6, 2013 5:29 AM
Points: 1, Visits: 5
I am querying a database that holds the length of time an event took and what I am trying to achieve is to be able to record the average, maximum and the median of these times in a matrix table grouped by the month the event took place.

The average and maximum are fine as they are built in functions but as I am using 2008 there isn't a built in function for the median. I have found some custom code that correctly reports the median but it only reports the median for the whole period not the individual grouped months.

Could any provide me with some code or point me in the direction of some useful guides as I have struggled to find what I am after but it may be the words I am using in my searches.

Many thanks.
Post #1449640
Posted Monday, May 6, 2013 9:56 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 12:03 PM
Points: 1,480, Visits: 1,028
Something to try. I've never found median to be a very meaningful number. Anyhoo.
http://techfilth.blogspot.com/2008/07/calculate-median-on-group-in-ssrs.html
Post #1449772
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse