SELECTEDMEASUREFORMATSTRING Function (DAX)

How does the SELECTEDMEASUREFORMATSTRING function (DAX) work?

The SELECTEDMEASUREFORMATSTRING function (DAX) returns format string for the measure that is currently being evaluated.

SELECTEDMEASUREFORMATSTRING Formula Syntax

SELECTMEASUREFORMATSTRING(
     
)

How do you use the SELECTEDMEASUREFORMATSTRING function?

This function can only be referenced in expressions for calculation items in calculation groups. It is designed to be used by the Format String Expression property of calculation items.

Related Blog Posts

Related Support Forum Posts

Dax Calculation question
Dax not working
DAX Buffer Calculation Query

Considerations when using the SELECTEDMEASUREFORMATSTRING function

If the model contains a measure that returns the currently selected currency and you want to include the currency symbol as part of the format string, you can use this code to append the currency symbol to the current format string.

Customizing the format string of a calculation item is useful to preserve user experience consistency when browsing the model. However, a careful developer should consider that the format string operates on any measure used with the calculation item. When there are multiple calculation groups in a report, the result produced by these properties also depends on the calculation group precedence.

Related Video Tutorials

Formula examples using the SELECTEDMEASUREFORMATSTRING function

SELECTEDVALUE( DimCurrency[FormatString], SELECTEDMEASUREFORMATSTRING() )

Related DAX Functions

ISSELECTEDMEASURE

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formula Reference Guide