Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Update calculated measure visible property using AMO

$
0
0

Hey Folks here is the problem I am try to solve...

I am writing a SSIS package to update the visible property of the calculated measure.I am using the following query to get the all the measures of a Cube

select

measure_name from $system.MDSCHEMA_MEASURESWHERE CUBE_NAME = 'Adventure Works'

Once I get the list of measure, I read the measure I need to hide from a text file. The logic I am using is below:

1)Get all the calculated measurefrom the above query

2)Read the input measure from the text file.

3)If there is a match go ahead and update the visible property of the calculated measure to false

In step 3 I am trying to use the AMO to retreive all the measures of a Cube so that the matching measure's visibility could be set to using  the following statement ......measure.Visible = false  

THE PROBLEM IS THAT USING AMO I CAN ONLY RETRIEVE THE RAW MEASURE AND NOT THE CALCULATED MEASURE. I was thinking to use the update member syntax to achieve the desired result but not able to do so.

Could someone please help me out with this...Long story short I am trying to find a way to retreive the calculated measure from a Cube programatically and once I retreive them I can set the visible property to false...Any suggestions would be greatly appreciated.

Thank you.


Viewing all articles
Browse latest Browse all 2472

Trending Articles



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