SELECTEDMEASUREFORMATSTRING
Inside a calculation item: the format string of the measure being computed.
Group: Information. Compatible with DAX.
Syntax
SELECTEDMEASUREFORMATSTRING ( )
It takes no parameters.
Returns
Text. The format string of the measure the calculation item is applied to, such as #,0; BLANK when it has none.
Remarks
- In a calculation item's expression it gives the measure's own format string as text.
- A measure the query defines has no format string: the result is BLANK.
- Outside a calculation item the call is an error.
Compared with DAX
Power BI uses it mostly in a calculation item's format string expression, to build a format from the measure's. OpenBI keeps such format string expressions with the model but does not apply them yet: results show in the measure's own format.
Examples
Outside a calculation item
The Example Brewery has no calculation group, and a query cannot define one; outside a calculation item the call has nothing to refer to, and is an error.
EVALUATE
ROW ( "Format", SELECTEDMEASUREFORMATSTRING () )
Result: an error.
Related functions
SELECTEDMEASURE, SELECTEDMEASURENAME, FORMAT, ISSELECTEDMEASURE.