MDX and value in it from Cube

Post Reply
EP_explorer
Regular Participant
Posts: 221
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

MDX and value in it from Cube

Post 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?
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: MDX and value in it from Cube

Post by jim wood »

I'm guessing you didn't search for this one before posting.....

http://www.tm1forum.com/viewtopic.php?p=18509
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
EP_explorer
Regular Participant
Posts: 221
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

Re: MDX and value in it from Cube

Post 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
EP_explorer
Regular Participant
Posts: 221
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

Re: MDX and value in it from Cube

Post 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))}
Post Reply