IMetricSetServiceAddFormulaFromDataCube Method

Adds a calculated measure from a formula already defined in the underlying data cube.

Namespace: Dundas.BI.Entities.MetricSets
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
Syntax
AnalysisElementUsage AddFormulaFromDataCube(
	MetricSet metricSet,
	string uniqueName,
	DataCube dataCube = null,
	PlacementPosition placementPosition = PlacementPosition.Measure
)

Parameters

metricSet  MetricSet
The metric set.
uniqueName  String
The unique name of the formula definition.
dataCube  DataCube  (Optional)
The data cube the formula is in.
placementPosition  PlacementPosition  (Optional)
The placement position for the new element.

Return Value

AnalysisElementUsage
The element usage.
Exceptions
ExceptionCondition
ArgumentNullExceptionmetricSet is .
ArgumentExceptionuniqueName is or Empty.
ScriptExceptionformula definition has an invalid script.
InvalidSessionExceptionThe caller context is not associated with a valid session.
InvalidOperationExceptionThe formula contains invalid element references.
NotFoundExceptionThe formula definition not found with given uniqueName.
InvalidOperationExceptionAdding an element to the metric set will exceed the configured maximum.
See Also