Skip to main content
Microsoft Idea

Power BI

New

Enable SELECTEDMEASUREFORMATSTRING for query measures

Vote (2) Share
's profile image

on 18 Apr 2024 12:59:01

If you define a measure in a thin report which is connected live to a Power BI semantic model no formatting information is passed in the query, which means that any calculation groups defined in the semantic model cannot use SELECTEDMEASUREFORMATSTRING - the function returns BLANK().


One possible use case is to have a calcultion group which formats measures to include the year on year % change in the result, e.g. £123,000 ( 5.5%). You would want the actual result of the measure to retain its defined format, e.g. currency or whole number with thousands separator, so that you can use the calculation item with any numeric measure.


Although dynamic format strings are not yet supported for locally defined queries, the standard formats all are supported, as are custom format strings. By passing the format string in the query it may also allow support for dynamic format strings.