Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Cannot we hide the calculated Measures of cube using AMO method.?

$
0
0

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

http://social.msdn.microsoft.com/forums/en-US/sqlanalysisservices/thread/a4a05a16-1a99-49bf-9d0f-bdb163c6cf8f/

http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/9de8cbb2-c6cc-49d2-a081-14167de28443

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


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>