SELECTEDMEASURENAME is a DAX function that returns the name of the measure currently being evaluated.
Syntax
SELECTEDMEASURENAME( )
Return Values
A string value holding the name of 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.
This function is often used for debugging purposes when authoring calculation groups.
The following calculation item expression checks if the current measure is Expense Ratio and conditionally applies calculation logic. Since the check is based on a string comparison, it is not subject to formula fixup and will not benefit from object renaming being automatically reflected. For a similar comparison that would benefit from formula fixup, please see the ISSLECTEDMEASURE function instead.
IF (
SELECTEDMEASURENAME = "Expense Ratio",
SELECTEDMEASURE (),
DIVIDE ( SELECTEDMEASURE (), COUNTROWS ( DimDate ) )
)
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy