Hi,

I currently have a cube with a Dynamic Date Dimension that contains calculated members such as YTD, LYTD, current month etc.

I need to add a new members that displays the last 12,18,24 months.

I have this "Current Year" code but cannot work out what it is doing or how to modify it. It successfully displays the months for the current year.

iif(
IsAncestor([Period].CurrentMember,strtomember("Period].[Year].&[" + CStr(Year(Now())) + "]").FirstChild),
(strtomember("[Period].[Year].&[" + CStr(Year(Now())) + "]"),[Dynamic Dates].[All Dates]),
iif(
IsAncestor(strtomember("[Period].[Year].&[" + CStr(Year(Now())) + "]"), [Period].CurrentMember),
[Dynamic Dates].[All Dates],
null
))

Can you help please.