AddGoalQuery

The analysis performed by an object of ClassType clsPartitionAnalyzer can be constrained to optimize a particular subset of queries. Each of the queries in this subset is called a GoalQuery and is specified by picking a level from each of the dimensions of the partition. The clsPartitionAnalyzer AddGoalQuery method is used to specify each GoalQuery prior to running the partition analysis.

Syntax

dsoPartAnalyzer. AddGoalQuery(DatasetName, Frequency)

dsoPartAnalyzer
The object of ClassType clsPartitionAnalyzer used to perform the analysis.
DatasetName
A numeric string that specifies which level from each dimension is to be included in the query. This string must have the same number of characters as the number of dimensions in the partition. See the example below.
Frequency
A weighting factor that corresponds to the number of times that an existing DatasetName query has previously been executed. If this DatasetName is a new query, the value of Frequency that is entered is used to weight the partition analysis. The greater the frequency, the more weight that is placed on the query during the analysis.
Remarks

It is likely that different GoalQuery subsets may be optimized with significantly different DesignedAggregations. The performance and storage requirements may warrant the construction of separate partitions for each GoalQuery subset.

Example

Assume that a partition contains the following three dimensions and levels.

  Customers Products Store Locations
Level #1 All All All
Level #2 Groups Brand Country
Level #3 Customer# SKU State
Level #4     City

A particular group of users needs to perform the following three queries:

Use the following code to add these goal queries. For more information, see InitializeDesign.

'Assume the existence of an object (dsoPartAnalyzer) of ClassType
'clsPartitionAnalyzer

'Must call InitializeDesign first

dsoPartAnalyzer.InitializeDesign

'Add goal queries

dsoPartAnalyzer.AddGoalQuery "134", 1

dsoPartAnalyzer.AddGoalQuery "313", 1

dsoPartAnalyzer.AddGoalQuery "222", 1

'Required after all goal queries have been added.

dsoPartAnalyzer.PrepareGoalQueries

You can now run a series of NextAnalysisStep methods until you achieve the desired optimization.

See Also
clsAggregation Properties Cross-Reference
clsPartition Using Decision Support Objects
clsPartitionAnalyzer  

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.