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 (26.2.0.1000)
Syntax
MeasureUsage AddMeasure(
	MetricSet metricSet,
	Guid parentId,
	string elementName,
	AggregatorFunctions aggregator
)

Parameters

metricSet  MetricSet
The MetricSet to add the element to.
parentId  Guid
The ID of the element parent structure.
elementName  String
The name of the element (column/measure/hierarchy) to add.
aggregator  AggregatorFunctions
The element aggregator.

Return Value

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.
InvalidOperationExceptionAdding an element to the metric set will exceed the configured maximum.
See Also