IMetricSetServiceAddMeasure Method

Adds a MeasureUsage element to the given metric set and saves it.

Namespace:  Dundas.BI.Entities.MetricSets
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax
MeasureUsage AddMeasure(
	MetricSet metricSet,
	Guid parentId,
	string elementName,
	AggregatorFunctions aggregator
)

Parameters

metricSet
Type: Dundas.BI.Entities.MetricSetsMetricSet
The MetricSet to add the element to.
parentId
Type: SystemGuid
The ID of the element parent structure.
elementName
Type: SystemString
The name of the element (column/measure/hierarchy) to add.
aggregator
Type: Dundas.BI.DataAggregatorFunctions
The element aggregator.

Return Value

Type: MeasureUsage
The added usage element.
Exceptions
ExceptionCondition
InvalidOperationExceptionThe metric set is not checked out to the caller or the underlying IAnalysisStructure does not support the current operation, either because it is not auto-generated or joining to the structure specified by parentId is not supported.
ArgumentNullExceptionmetricSet is .
ArgumentExceptionparentId is Empty or elementName is not a valid string or parentId references a structure that could not be found or that is invalid for the current operation
NotFoundExceptionThe structure with the specified parentId does not exist.
InvalidSessionExceptionThe caller context is not associated with a valid session.
InvalidDynamicHierarchyOperationExceptionThe operation is not supported for dynamic hierarchies.
InvalidOperationExceptionThe element in the metric set or the underlying structure is not a measure.
InvalidMeasureAggregatorExceptionThe aggregator isn't supported by the underlying provider.
See Also