ModelMeasures.Add method (Excel)

Adds a model measure to the model.

Syntax

expression.Add (MeasureName, AssociatedTable, Formula, FormatInformation, Description)

expression A variable that represents a ModelMeasures object.

Parameters

Name Required/Optional Data type Description
MeasureName Required String The name of the model measure.
AssociatedTable Required MODELTABLE The model table associated with the model measure. This is the table that contains the model measure, as seen in the Field List task pane.
Formula Required String The Data Analysis Expressions (DAX) formula, inserted as a string.
FormatInformation Required Variant The formatting of the model measure. See Remarks.
Description Optional Variant The description associated with the model measure.

Return value

ModelMeasure

Remarks

The formatting of the model measure can be of type:

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.