eo
MIS
- Apr 3, 2003
- 809
SSAS 2005. Herewith please see the cut down MDX code. The first section creates two measures and sets the format as #,#.
The second creates the logic for "DisplayTriangle" within a scope. The third, fourth and fifth sections are scopes where one of the measures is altered depending on the scope in which the users navigates. All formatted okay (requirement for format as #,#), except for the fifth section (where the scope is "triangulation"). I suspect this is because I am multiplying with "DisplayTriangle", but you will see that even that measure has a defined format string of #,#. How can I enforce the required format #,# to apply to the fifth section of the MDX?
I have now run out of ideas on how to correct this. Any ideas?
1:
2:
3:
4:
5:
EO
Hertfordshire, England
The second creates the logic for "DisplayTriangle" within a scope. The third, fourth and fifth sections are scopes where one of the measures is altered depending on the scope in which the users navigates. All formatted okay (requirement for format as #,#), except for the fifth section (where the scope is "triangulation"). I suspect this is because I am multiplying with "DisplayTriangle", but you will see that even that measure has a defined format string of #,#. How can I enforce the required format #,# to apply to the fifth section of the MDX?
I have now run out of ideas on how to correct this. Any ideas?
1:
Code:
CREATE MEMBER CURRENTCUBE.[MEASURES].[ClmGrsPaidIndemOrig]
AS NULL, FORMAT_STRING = "#,#", VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[MEASURES].[DisplayTriangle]
AS NULL, FORMAT_STRING = "#,#", VISIBLE = 0;
2:
Code:
SCOPE([Triangulation].[ProcessingYear].[All].Children);
[MEASURES].[DisplayTriangle] =
IIF( [Year Of Account].[YearOfAccount].CurrentMember.Properties("KEY", TYPED) - 1 +
[Triangulation].[ProcessingMonthNumber].CurrentMember.Properties("KEY", TYPED) / 12
<= VBA!Year(VBA!Now()),
1, NULL);
END SCOPE;
3:
Code:
SCOPE([Aggregation Type].[AggregationType].&[Period]);
[MEASURES].[ClmGrsPaidIndemOrig] =
Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
, [Measures].[GrsPaidIndemYPROrig] *
([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
);
END SCOPE;
4:
Code:
SCOPE([Aggregation Type].[AggregationType].&[Accumulation]);
[MEASURES].[ClmGrsPaidIndemOrig] =
Sum ( {NULL : [Date Transaction].[DateTransaction].CurrentMember},
Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
, [Measures].[GrsPaidIndemYPROrig] *
([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
));
END SCOPE;
5:
Code:
SCOPE([Aggregation Type].[AggregationType].&[Triangulation]);
[MEASURES].[ClmGrsPaidIndemOrig] = [Measures].[DisplayTriangle] *
Sum ( {NULL : [Triangulation].[Triangulation].CurrentMember},
Sum(Descendants([X Conv Granularity].[Dim Ccy Conv Granularity].CurrentMember, , LEAVES)
, [Measures].[GrsPaidIndemYPROrig] *
([MEASURES].[Conversion Rate], [Currency Conversion Type].[CurrencyConvType].CurrentMember)
)
);
END SCOPE;
EO
Hertfordshire, England