MDX for current and previous month
Posted: Thu Oct 16, 2025 3:50 pm
Hi All,
I have a period dimension that is by day. days roll up to months, months to quarters and quarters to years.
I am trying to create dynamic mdx that will return the current month and previous month
This works to return the current month
And this works for previous month if I hard code CURRENTMEMBER.NAME to the current month
Is there a way to combine these so it will bring back current and previous at the same time?
I have a period dimension that is by day. days roll up to months, months to quarters and quarters to years.
I am trying to create dynamic mdx that will return the current month and previous month
This works to return the current month
Code: Select all
FILTER(TM1SUBSETALL([report_HDD_fiscalPeriodByDay]) , [report_HDD_fiscalPeriodByDay].CURRENTMEMBER.NAME = [CONTROL].([Control Parameters].[Current Month],[CONTROL_m].[S-Value]))
Code: Select all
FILTER(TM1SUBSETALL([report_HDD_fiscalPeriodByDay]) , [report_HDD_fiscalPeriodByDay].CURRENTMEMBER.NAME = [report_HDD_fiscalPeriodByDay].CURRENTMEMBER.PROPERTIES("PreviousPeriod"))