Find Min, Max after dividing two measure fields

Question

• Hi,

I am trying to find Minimum and the Maximum value after dividing the two measure fields. Example:

Member [Measures].[Min_Natural_Gas] AS Min([Measures].[Total BTU]/[Measures].[Total Actual WT])

The two measure fields are Total BTU and Total Actual WT Column.

How can i perform this?

Thanks

Nandan

Thursday, July 12, 2012 8:51 PM

Answers

• Min funstion evaluates an expression over a set. Refer to the defintion of the MIN, http://msdn.microsoft.com/en-us/library/ms145600.aspx Use your expression [Measures].[Total BTU]/[Measures].[Total Actual WT] against a set (could be time, product etc. members ) to be evaluated.

Alternatively, if [Measures].[Total BTU] and [Measures].[Total Actual WT] are base measures, try defining a calculated field in the DSV as [Measures].[Total BTU]/[Measures].[Total Actual WT]  and include the calculated field as a base measure with MIN as the aggregation function

Hope this helps.

Karthik

Friday, July 13, 2012 3:29 AM