Median in OLAP problem

Last Post 26 May 2007 07:28 AM by SQLUSA. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

24 May 2007 01:52 AM
I am facing some problem in calculating Median

I am trying to calculate the median value using one of the measures
and a dimension value.

Time is a measure in my cube and OpId is one of the dimensions.The
result is as follows:

opid time median

1 55

2 23

3 23

Total 23

The Time here for Op Id 1 is the aggregation for all the rows whose
OpId is 1.I want the median of the values whose OpId is 1 which is not
showing at the moment.

What I am getting here is the median for all of the OpId but what I
really want is the median for each of the individual Opid's as well.

I am using a calculated field Median with the following expression.


( [Dim Operation].[Dim Operation].currentmember.children ,[Measures].
[Elapsed Time])


New Member
New Member

26 May 2007 07:28 AM
Just a hint: try to list the values which will be the base for the median.

As a second step, adjust your median formula.

Kalman Toth, Business Intelligence Architect
SQL Server Training -

Acceptable Use Policy