I have created a calculated measure that computes a weighted ratio for the current balance of all loans that fall into various risk ratings:
WITH
MEMBER [MEASURES].[Weighted Ratio] AS
(Measures.[Current Balance] * [Risk Rating].[Loan Rating Code].CurrentMember.member_value) /
(
[Measures].[Current Balance],
Ancestor([Risk Rating].[Loan Rating Code].CurrentMember, 1)
), FORMAT_STRING = "Standard"
SELECT
{[Measures].[Current Balance], [Measures].[Weighted Ratio]} on COLUMNS,
[Risk Rating].[Loan Rating Code].MEMBERS ON ROWS
FROM
[Test Cube]
The problem is that the results come back only at the child level, instead of being summed up:
Current Balance Weighted Ratio
All $3,245,749,329.46 (null)
0 $661,388.20 0.00
1 $17,341,801.10 0.01
2 $117,188,374.06 0.07
3 $596,477,812.37 0.55
4 $1,266,047,841.51 1.56
5 $986,789,425.72 1.52
6 $119,055,732.16 0.22
7 $133,050,242.69 0.29
8 $9,136,711.65 0.02
How can I get the sum to show up at the All level instead of (null)?