Median

Median

Post by Arun » Sun, 30 Mar 2003 09:33:59



Hi,

How can I get the median function to work in a calculated member.  I want
the median of 1 measure called amount. The Median function is:
Median(?Set?[, ?Numeric Expression?])
The problem is, what argument do I give in the <<Set>>.

Thanks.

 
 
 

Median

Post by vsuresh_rjp » Thu, 15 May 2003 01:51:41


hi,
u can use like this

with Member [Measures].[Tx Median] AS
'Median(Descendants([Employment Status]),[Household Income])'
select { [Measures].[Household Income], [Measures].[Tx Median]} on
Columns from cube_name

this is to use in Analysis Manager

Median({Descendants([Employment Status].currentmember,[Employment
Status].[Employed full time].level)},[HouseHold Income])

iam getting the output which is not correct, but this is the way to
use..

here household Income is my measure with aggregate function max,

--
Posted via http://dbforums.com

 
 
 

Median

Post by Sean Boon [MS » Thu, 15 May 2003 08:01:06


If you're trying to calculate the Median value of individual people, you'll
need to add a "person" dimension to your cube to use the Median function and
include that in your MDX statement.

Sean

--
Sean Boon
SQL BI Product Unit

**This posting is provided AS IS, with no warranties, and confers no
rights.**


Quote:

> hi,
> u can use like this

> with Member [Measures].[Tx Median] AS
> 'Median(Descendants([Employment Status]),[Household Income])'
> select { [Measures].[Household Income], [Measures].[Tx Median]} on
> Columns from cube_name

> this is to use in Analysis Manager

> Median({Descendants([Employment Status].currentmember,[Employment
> Status].[Employed full time].level)},[HouseHold Income])

> iam getting the output which is not correct, but this is the way to
> use..

> here household Income is my measure with aggregate function max,

> --
> Posted via http://dbforums.com

 
 
 

1. Median Function/Stored Procedure?

Does anyone have or know of a good median function or stored procedure for
MS SQL server 6.5?  I have the one from the knowledge base but just wanted
to know if there was a better one.

Thanks
Hank Clyatt

2. SQL6.5 Enterprise

3. Medians

4. Compatibilities with Terminal Server?

5. Median

6. Rebuild Transaction Log files

7. Median value from group

8. triggers through linked servers

9. Fastest way to compute medians?

10. Can't find a happy median

11. Median for groups...

12. Calc Member - Median

13. Median and Mode