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
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
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
Related Course Modules
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.