SELECTEDMEASURE

Used by expressions for calculation items to reference the measure that is in context.

Note

This function currently applies only to SQL Server 2019 Analysis Services CTP 2.3 and later.

Syntax

SELECTEDMEASURE() 

Parameters

None

Return value

A reference to the measure that is currently in context when the calculation item is evaluated.

Remarks

Can only be referenced in the expression for a calculation item.

Example

The following calculation item expression calculates the year-to-date for whatever the measure is in context.

CALCULATE(SELECTEDMEASURE(), DATESYTD(DimDate[Date]))

See also

SELECTEDSMEASURENAME
ISSELECTEDSMEASURE