dbTalk Databases Forums  

Percentiles

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Percentiles in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
whit
 
Posts: n/a

Default Percentiles - 02-18-2004 , 11:14 AM






I've been asked to add a 25th (Q1) percentile and a 75th (Q3) percentile of
SAT scores to an existing cube. I already have a calculated member for
average SAT, but I can't seem to figure out how to create a calculated
member for the 25th and 75th percentiles.

In SQL, if I have a view listing the SATs in order over all time, I can
simply
SELECT TOP 1 SAT FROM ... WHERE SAT NOT IN (SELECT TOP [24|74] PERCENT SAT
FROM ...)

I'm probably missing something but I can't seem to figure out how to do this
as a calculated member. Any help will be greatly appreciated!



Reply With Quote
  #2  
Old   
Sean Boon [MS]
 
Posts: n/a

Default Re: Percentiles - 02-18-2004 , 02:47 PM






Percentiles can be done, but they are a little tricky. See the following
whitepaper for implementation details.

http://www.dsslab.com/MDXSolutions.h...tatistics.html


--
Sean

--
Sean Boon
SQL Server BI Product Unit

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"whit" <mgagne (AT) whitworth (DOT) edu> wrote

Quote:
I've been asked to add a 25th (Q1) percentile and a 75th (Q3) percentile
of
SAT scores to an existing cube. I already have a calculated member for
average SAT, but I can't seem to figure out how to create a calculated
member for the 25th and 75th percentiles.

In SQL, if I have a view listing the SATs in order over all time, I can
simply
SELECT TOP 1 SAT FROM ... WHERE SAT NOT IN (SELECT TOP [24|74] PERCENT SAT
FROM ...)

I'm probably missing something but I can't seem to figure out how to do
this
as a calculated member. Any help will be greatly appreciated!





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.