Below MDX query is to perform dynamic monthly comparison of a measure with current and previous year months, to achieve this, a current year parameter is applied as like below
WITH
MEMBER [Measures].[ActiveLearnerPercentPreviousYear] as ([Measures].[Active Learner %],
PARALLELPERIOD ([MonthlyPeriod].[Calendar Period].[Month],12,[MonthlyPeriod].[Calendar Period].CurrentMember)), FORMAT_STRING ='Percent'
MEMBER [Measures].[ActiveLearnerPercentCurrentYear] as([Measures].[Active Learner %])
SELECT {[Measures].[ActiveLearnerPercentCurrentYear] , [Measures].[ActiveLearnerPercentPreviousYear] } ON COLUMNS ,
([MonthlyPeriod].[Calendar Period].[Month], [MonthlyPeriod].[Month No].[Month No]) ON ROWS
FROM [MonthlyMetrics]
WHERE (
strtomember("[MonthlyPeriod].[Year].&[" + Format(now(), "yyyy") + "]")
)