Measure Property
Sets or returns the name of measure whose values
are used for a value restriction.
Syntax
ValueRestriction.Measure
Applies To
Discussion
Use this property to specify the name of a measure that a ValueRestriction object uses to limit the number of categories for the results of an AdvancedQuery.
For a ValueRestriction, the order of the components is important. The Dimension property must be set before the Measure, Operator, Operand1, Operand2, and Count properties and the DimensionFilter method. The Name property can be set anywhere within the filter definition.
Type
String
Access
Read/Write
Example
This example creates an advanced subset that selects countries or regions from the Locations dimension. The value restriction (type 4) limits the results to return only those countries or regions whose Revenue Values for Sports Chains are between 25,000 and 100,000.
Sub Main() Dim strCubePath As String Dim objPPRep As Object Dim objValue As Object Dim objAdvanced As Object strCubePath = "C:\Cubes and Reports\Great Outdoors.mdc" Set objPPRep = CreateObject("CognosPowerPlay.Report") objPPRep.New strCubePath, 1 objPPRep.ExplorerMode = False objPPRep.Visible = True Set objValue = objPPRep.ReportQueries.Add(4) With objValue .Name = "25000-100000" .Dimension = "Locations" .Measure = "Revenue" .Operator = "between" .Operand1 = 25000 .Operand2 = 100000 .DimensionFilter 4, "Sports Chain" End With Set objAdvanced = objPPRep.ReportQueries.Add(3) With objAdvanced .Name = "Locations" .Dimension = "Locations" .Level "Country or Region" .ValueRestriction objValue.Name .Execute .AddToReport 0,1,3 End With Set objAdvanced = Nothing Set objValue = Nothing Set objPPRep = Nothing End Sub