Wondered if I had missed something fundamental and/or basic about mdx. I have a year dimension and the elements are 2013, 2014, 2015, 2016, 2017, 2018 etc etc etc
I have the current year held in an admin cube, so the value is currently 2017.
I want to create some mdx that includes those years which are more than 3 years older than the current year (2013 and older) and the current and previous year.
Now in order to do this I was hoping to test the year element against the admin cube value, so I wanted to say filter if the current year member is < admin cube current year value. But I can’t see anyway of filtering values based on the actual element itself, instead I could create an attribute and test the admin cube value against this, but I thought I would try to avoid this.
So is there no way of directly testing the actual element itself against a single cube value?
Incidentally the way I have got those years which are more than 3 years older than the current year and the current and previous year is as follows:
Code: Select all
{UNION(
Except( lastperiods(99, TM1Member( [C_Year].[CYR].Item(0), 0) ),
lastperiods(4, TM1Member( [C_Year].[CYR].Item(0), 0) )),
lastperiods(2, TM1Member( [C_Year].[CYR].Item(0), 0)))}