Assume it is the median value that has you stumped, try reading this, it works for myself.
http://www.mssqltips.com/sqlservertip/2523/script-to-calculate-the-median-value-for-sql-server-data/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=20111030
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please read[/url]
Before posting a performance problem please read[/url]