adolf garlic
adolf garlic

Reputation: 3096

Use of 'median' function in calculated field in SSRS

According to this it looks like you can use an aggregate function in a calculated field, but if I try and use the median command, I get an error
"the value expression for the field =Median( ...what I wrote below..) contains an error: BC30451 Name 'Median' is not declared.

I have tried

=Median(Fields!name_of_field_I_want_median_from.Value,"dsTheDatasetFieldIsIn")

and

=Median(Fields!name_of_field_I_want_median_from.Value)

neither work

N.B. Dataset is derived from MDX

Upvotes: 0

Views: 2900

Answers (2)

George Gergues
George Gergues

Reputation: 1

Unfortunately Median is not an SSRS function , or it does not work inside an aggregate on an SSRS dataset.

My simple workaround if you are stuck with SSRS.

  1. Create a Bar Chart with the data set you're investigating .
  2. Add a calculated set to the chart (and you can pick Median or Mean or any other stat).
  3. Select to "show data label" on the Median set show exact number.

Best of Luck.

Upvotes: 0

Max
Max

Reputation: 804

maybe I didn't understand your post, but I think that you use incorrect syntax. Try use next syntax:

Median(Set_Expression [ ,Numeric_Expression ] ),

where Numeric_Expression --- it's your measure.

P.S. Also, you can post full expression of your calculated member.

Upvotes: 2

Related Questions