Page 1 of 1

TM1 MDX

Posted: Fri May 15, 2020 1:59 pm
by dharav9
Hi, All

We have a lookup cube where Fcst Value = FY2021 has mentioned.

We have a dynamic subset called FcstYr which retrieves the vaelue based on lookup cube;
MDX of this subset is:

{
FILTER(
TM1SUBSETALL( [Time]),
[Time].CurrentMember.Name = [Globals].([Globals].[Fcst Year], [Value_Msr].[ValueS])
)
}

I would like to extract past 3 years dynamically based on current fcst year. E.g.: FY2018, FY2019, FY2020 based on this.

When I tried following result came FY2022.

{
FILTER(
TM1SUBSETALL( [Time]),
[Time].CurrentMember.prevmember.Name = [Globals].([Globals].[Fcst Year], [Value_Msr].[ValueS])
)
}

I couldn't able to use Lastperiods function as well.

Can anyone assist?

Thank You
Dharav

Re: TM1 MDX

Posted: Fri May 15, 2020 2:17 pm
by Wim Gielis
Without seeing the dimension elements and the structures, it's difficult to comment. Certainly if the MDX for LastPeriods is not given.

Should we guess what you see in front of you ?

Anyway, this should work and serves as an example - a straight copy from my website by the way:

Code: Select all

{LastPeriods( 4, StrToMember("[Year].[" + [System].([System_Prm].[Year],[System_Msr].[Text]) + "]") )}
dharav9 wrote: Fri May 15, 2020 1:59 pmI couldn't able to use ...
You are missing some words here.

Can you also find a better topic title ? TM1 is pretty much useless in the title, given the forum, and MDX is very vague too. Thanks.