Page 1 of 1

MDX and value in it from Cube

Posted: Wed Nov 26, 2014 3:14 pm
by EP_explorer
I want to use value from Cubes as parameters in MDX.
For example I wrote:

Code: Select all

{[Time_days_month].[24.05.2014]:[Time_days_month].[31.12.2015]}
or

Code: Select all

{ LastPeriods(-99999, [Time_days_month].[24.05.2014]) }
I want to put value from Cube on place of [24.05.2014]. I tried for example
{[Time_days_month].[Cube_name].([One].[1],[Period].[End_ofPeriod]):[Time_days_month].[31.12.2015]}
But of course it shows Error.

Is it possible to put values from Cube in MDX expressions and how I can do it?
or it is possible only If I use Filter?

Re: MDX and value in it from Cube

Posted: Wed Nov 26, 2014 3:23 pm
by jim wood
I'm guessing you didn't search for this one before posting.....

http://www.tm1forum.com/viewtopic.php?p=18509

Re: MDX and value in it from Cube

Posted: Wed Nov 26, 2014 3:31 pm
by EP_explorer
Of course I peep in Creating Dynamic Subsets in Applix TM1 with MDX - A Primer

But I didn't find answer for my question

Re: MDX and value in it from Cube

Posted: Thu Nov 27, 2014 9:12 am
by EP_explorer
So one way to tackle the problem (which I found) is create a new subset which contain one element and which is equal the value from Cube with parameter.

After it use new subset in expression
In my case I created subset Close_day which contained value from Cube Cube_name and used it .

Code: Select all

{lastperiods(-99999, tm1member( [Time_days_month].[Close_day].Item(0),0))}