Hi,
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 thatwe can’t hide the calculated Measures using AMO. Is it true or not ? I have found some post as
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 scriptin cube.MdxScripts)
{
foreach (CalculationProperty cpin script.CalculationProperties)
{
if (cp.CalculationReference == CalMeasureName)
//CalMeasureName is a one of calculated Measure name define in cube.
{
cp.Visible = false;
// this.cube.MdxScripts.FindByName(cp.CalculationReference).Update();
script.Update();
Cube cb =this.cube;
cb.Update(UpdateOptions.ExpandFull);
}
}
So,is any one have tried this before to achieve such solution.Hope to hear from one who knows better on this.Looking for help or idea if you have any.
Thanks,
Anil Maharajan