Skip to main content

Defining Age Members

Defining Age Members

It is often useful to have members that group records by age. To define such members, use an existing time level and the special NOW member. For example, consider the MonthSold level in the HoleFoods sample. You could define a calculated member named 3 Months Ago with the following value_expression:

[dateofsale].[actual].[monthsold].[now-3]

For example:

WITH MEMBER CalcD.[3 months ago] as '[dateofsale].[actual].[monthsold].[now-3]' 
SELECT calcd.[3 months ago] ON 0, {MEASURES.[units sold], MEASURES.target} ON1 FROM holefoods
 
                              3 months ago
1 Units Sold                             37
2 Target                             254.00
FeedbackOpens in a new tab