SELECTEDMEASURENAME Function (DAX)

How does the SELECTEDMEASURENAME function (DAX) work?

The SELECTEDMEASURENAME function (DAX) returns name of the measure that is currently being evaluated.

SELECTEDMEASURENAME Formula Syntax

SELECTEDMEASURENAME (
     
)

How do you use the SELECTEDMEASURENAME function?

This function is often used for debugging purposes when authoring calculation groups. Used by expressions for calculation items to determine the measure that is in context by name.

Related Blog Posts

Related Support Forum Posts

Dax Calculation question
Dax not working
DAX Buffer Calculation Query

Considerations when using the SELECTEDMEASURENAME function

The SELECTEDMEASURENAME function should be considered when the business logic of a calculation item must apply a transformation based on an external configuration. For example, the function might be useful when there is a table with a list of measures that should be enable a behavior in a calculation item so that the model has an external configuration that can be modified without requiring an update of the DAX code.

Related Video Tutorials

Formula examples using the SELECTEDMEASURENAME function

IF ( SELECTEDMEASURENAME = “Expense Ratio”, SELECTEDMEASURE (), DIVIDE ( SELECTEDMEASURE (), COUNTROWS ( DimDate ) ) )

IF ( NOT ( SELECTEDMEASURENAME () = “Margin %” ), DIVIDE ( SELECTEDMEASURE (), COUNTROWS ( ‘Date’ ) ) )

Related DAX Functions

ISSELECTEDMEASURE

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

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.