AdoMdClient – Where are the measure groups?
- April 22nd, 2010
- Write comment
Been busy creating a Silverlight/SSAS mashup recently to show off their potential when used together to both colleagues and clients. While attempting to build the measure selection/filtering interface I thought it would be pleasant if they were grouped by their… measure groups, hierarchically like they are when browsing a cube in SSMS or Visual Studio. Measures are easy enough to find as a collection on the CubeDef object as a MeasureCollection. But where are measure groups hiding?
Naturally I would have thought there would be a MeasureGroup or MeasureGroupCollection off the CubeDef – no such luck. Debugging and taking a closer look at the Measure object, in the PropertyCollection (the Properties member) I spyed the property MEASUREGROUP_NAME. The sweet smell of victory. So to get your measure’s measure group here is the C#:
Property measureGroupProperty = measure.Properties["MEASUREGROUP_NAME"];
string measureGroupName = measureGroupProperty.Value.ToString();