I have a strange issue with formatting a calculated member in SSAS (multidimensional).
I have a budget amount that's defined on a yearly level and then I'm allocating it to the quarter, month or week level by dividing the yearly amount with the number of members.
When using the SCOPE with the DIVIDE and COUNT MDX function, the defined formatting of the measure (FORMAT_STRING) is no longer applied.
Here is the code and the example:
CREATE MEMBER CURRENTCUBE.[Measures].[VA Budget]
AS
NULL,
FORMAT_STRING = "#,#.00",
VISIBLE = 1;
([Measures].[VA Budget], [Datum].[Datum JQMT].[Jahr].Members) = [VA Jahresbudget];
([Measures].[VA Budget], [Datum].[Datum JQMT].[Quartal].Members) = DIVIDE([VA Jahresbudget], COUNT( Descendants(Ancestor([Datum].[Datum JQMT].CurrentMember, [Datum].[Datum JQMT].[Jahr]), [Datum].[Datum JQMT].[Quartal]) ));
([Measures].[VA Budget], [Datum].[Datum JQMT].[Monat].Members) = DIVIDE([VA Jahresbudget], COUNT( Descendants(Ancestor([Datum].[Datum JQMT].CurrentMember, [Datum].[Datum JQMT].[Jahr]), [Datum].[Datum JQMT].[Monat]) ));
([Measures].[VA Budget], [Datum].[Datum JQMT].[Tag].Members) = DIVIDE([VA Jahresbudget], COUNT( Descendants(Ancestor([Datum].[Datum JQMT].CurrentMember, [Datum].[Datum JQMT].[Jahr]), [Datum].[Datum JQMT].[Tag]) ));
([Measures].[VA Budget], [Datum].[Datum JWT].[Woche].Members) = DIVIDE([VA Jahresbudget], COUNT( Descendants(Ancestor([Datum].[Datum JWT].CurrentMember, [Datum].[Datum JWT].[Jahr]), [Datum].[Datum JWT].[Woche]) ));
[]
However, it is correctly applied when I'm NOT using the COUNT in the DIVIDE function:
([Measures].[VA Budget], [Datum].[Datum JQMT].[Monat].Members) = DIVIDE([VA Jahresbudget], 12 ));
[]
Also, if I define another calculated member and I refer to the previous one, the formatting is again correctly applied:
CREATE MEMBER CURRENTCUBE.[Measures].[VA Budget2]
AS
[Measures].[VA Budget],
FORMAT_STRING = "#,#.00",
VISIBLE = 1;
[]
What's happening here? Is this a bug? How can I make the formatting to be correct without defining an additional calculated member?
(SSAS version is 2016 - 13.0.5206)