SELECTEDMEASURE Function (DAX)

How does the SELECTEDMEASURE function (DAX) work?

There is a proliferation of measures in complex Power BI data models, resulting in poor user experience where an analyst will need to sift through so many measures. Calculation groups are used to reduce the number of measures and present a cleaner, uncluttered user interface. The SELECTEDMEASURE function (DAX) is a type of calculation group. It is used for calculation items using expressions to reference the measure in context.

SELECTEDMEASURE Formula Syntax

SELECTEDMEASURE(
)

How do you use the SELECTEDMEASURE function?

The SELECTEDMEASURE function is often used in calculation items. It returns the measure that is currently being evaluated.

Related Blog Posts

selectedmeasure function (dax)
selectedmeasure function (dax)
selectedmeasure function (dax)

Related Support Forum Posts

Dynamic Formatting of Selected Measure
Formating issue when Combining Dynamic Grouping
Filtering a table based on multi column custom grouping

Considerations when using the SELECTEDMEASURE function

SELECTEDMEASURE references the measure that is currently in the context of the assessment of the calculation item. This expression has no parameters and can only be referenced for the calculation item that is being evaluated.

Related Video Tutorials

selectedmeasure function (dax)

Formula examples using the SELECTEDMEASURE function (DAX)

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

CALCULATE(
    SELECTEDMEASURE( ),
    SAMEPERIODLASTYEAR( ‘Date'[Date])
)

CALCULATE(
    SELECTEDMEASURE( ),
    DATESQTD( ‘Date'[Date] )
)

Related DAX Functions

SELECTEDMEASURENAME
DAX Guide ISSELECTEDMEASURE

Related Course Modules

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.