Normally best way to create this in SSAS 2005 is to create real measure with
aggregation function LastChild. If for some reason you still need to create
calculated measure, just use fuction .LastChild on current member of Date
dimension, and you will allways get value of last period child.
Example: We want to see last semester value for year level data. Lets first see what data values are at Calendar Semester level:
SELECT {[Measures].[Internet Order Count]} ON 0
, DESCENDANTS([Date].[Calendar].[All Periods],[Date].[Calendar].[Calendar Semester] ) ON 1
FROM [Adventure Works]
Example: We want to see last semester value for year level data. Lets first see what data values are at Calendar Semester level:
SELECT {[Measures].[Internet Order Count]} ON 0
, DESCENDANTS([Date].[Calendar].[All Periods],[Date].[Calendar].[Calendar Semester] ) ON 1
FROM [Adventure Works]
No comments:
Post a Comment