Cannot hide the calculated Measures of cube using AMO method.?
7/14/2013 10:19:15 PM
I have listed the calculated Measures of cube using AMO code and now all I want is to hide some of these calculated Measures but while researching some post I found that we can’t hide the calculated Measures using AMO .
I tried to coded as below to hide logic but it doesn't work since there is no any object define in AMO for calculated measures if I am not wrong.:
foreach (MdxScript script in cube.MdxScripts)
foreach (CalculationProperty cp in script.CalculationProperties)
if (cp.CalculationReference == CalMeasureName)
//CalMeasureName is a one of calculated Measure name define in cube.
cp.Visible = false;
Cube cb = this.cube;
But the scripts doesn't work since as per Microsoft calculated Measures are not treat as AMO objects and we couldn't simply set the properties to hide the calculated Measures.
Hope this feature will be included in next release version if possible or is there some an alternative way.