Simplyfying a Timeinterval MDX subset?

Post Reply
Darkhorse
Posts: 141
Joined: Wed Mar 09, 2011 1:25 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2003 2007 2010 2013

Simplyfying a Timeinterval MDX subset?

Post by Darkhorse »

Hi guys,

Is there anyway to simplyfiy the following MDX?

{[}TimeIntervals].[0M00]}+{[}TimeIntervals].[0M01]}+{[}TimeIntervals].[0M02]}+{[}TimeIntervals].[0M03]}+{[}TimeIntervals].[0M04]}+{[}TimeIntervals].[0M05]}+{[}TimeIntervals].[0M06]}+{[}TimeIntervals].[0M07]}+{[}TimeIntervals].[0M08]}+{[}TimeIntervals].[0M09]}+{[}TimeIntervals].[0M10]}+{[}TimeIntervals].[0M11]}+{[}TimeIntervals].[0M12]}+{[}TimeIntervals].[0M13]}+{[}TimeIntervals].[0M14]}+{[}TimeIntervals].[0M15]}+{[}TimeIntervals].[0M16]}+{[}TimeIntervals].[0M17]}+{[}TimeIntervals].[0M18]}+{[}TimeIntervals].[0M19]}+{[}TimeIntervals].[0M20]}+{[}TimeIntervals].[0M21]}+{[}TimeIntervals].[0M22]}+{[}TimeIntervals].[0M23]}+{[}TimeIntervals].[0M24]}+{[}TimeIntervals].[0M25]}+{[}TimeIntervals].[0M26]}+{[}TimeIntervals].[0M27]}+{[}TimeIntervals].[0M28]}+{[}TimeIntervals].[0M29]}+{[}TimeIntervals].[0M30]}+{[}TimeIntervals].[0M31]}+{[}TimeIntervals].[0M32]}+{[}TimeIntervals].[0M33]}+{[}TimeIntervals].[0M34]}+{[}TimeIntervals].[0M35]}+{[}TimeIntervals].[0M36]}+{[}TimeIntervals].[0M37]}+{[}TimeIntervals].[0M38]}+{[}TimeIntervals].[0M39]}+{[}TimeIntervals].[0M40]}+{[}TimeIntervals].[0M41]}+{[}TimeIntervals].[0M42]}+{[}TimeIntervals].[0M43]}+{[}TimeIntervals].[0M44]}+{[}TimeIntervals].[0M45]}+{[}TimeIntervals].[0M46]}+{[}TimeIntervals].[0M47]}+{[}TimeIntervals].[0M48]}+{[}TimeIntervals].[0M49]}+{[}TimeIntervals].[0M50]}+{[}TimeIntervals].[0M51]}+{[}TimeIntervals].[0M52]}+{[}TimeIntervals].[0M53]}+{[}TimeIntervals].[0M54]}+{[}TimeIntervals].[0M55]}+{[}TimeIntervals].[0M56]}+{[}TimeIntervals].[0M57]}+{[}TimeIntervals].[0M58]}+{[}TimeIntervals].[0M59]}+{[}TimeIntervals].[1M00]}

Im trying to collect all the Minutes of the hour in the Timeintervals dimension, This works when i run it however to create the mdx takes alot of time, is there a shorter route?

thanks all
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Simplyfying a Timeinterval MDX subset?

Post by tomok »

Why does it need to be dynamic? Why not just create a static subset of those elements?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Darkhorse
Posts: 141
Joined: Wed Mar 09, 2011 1:25 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2003 2007 2010 2013

Re: Simplyfying a Timeinterval MDX subset?

Post by Darkhorse »

its written in a TI and it doesnt need to be dynamic but i want to delete it after ive done
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

Re: Simplyfying a Timeinterval MDX subset?

Post by AmbPin »

There must be a better way to achieve what you are trying to get at, however you could build up the MDX string in a while loop something like this:-

Code: Select all

i = 0;
s= '';
while(i < 60);
   i = i + 1;
   s = s | 'blah blah' | NumberToString(i);
end;
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Simplyfying a Timeinterval MDX subset?

Post by qml »

Darkhorse wrote:its written in a TI (...) but i want to delete it after ive done
I can't see how any of the above requires this to be a dynamic subset. As tomok says, create a static one, populate it with the right elements and then delete it when not needed anymore. Remember: keep it simple if there is no real need to complicate things.
Kamil Arendt
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Simplyfying a Timeinterval MDX subset?

Post by Wim Gielis »

Dynamic, yet simple:

{[}TimeIntervals].[0M00]:[}TimeIntervals].[1M00]}
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Darkhorse
Posts: 141
Joined: Wed Mar 09, 2011 1:25 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2003 2007 2010 2013

Re: Simplyfying a Timeinterval MDX subset?

Post by Darkhorse »

Thanks wim,

I need this to be dynamic because its an auto installer of a cube system I want to transfer to multiple instances and install the subset on first run.

Once again thanks guys appreciate this a lot
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Simplyfying a Timeinterval MDX subset?

Post by Wim Gielis »

How do you install things? TI? Copy/paste?
How do you decide on the first and last time interval? If it's in a separate cube or attribute,
the MDX could read the information there and continue to work in a dynamic way.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Darkhorse
Posts: 141
Joined: Wed Mar 09, 2011 1:25 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2003 2007 2010 2013

Re: Simplyfying a Timeinterval MDX subset?

Post by Darkhorse »

Sorry Wim I totally agree m8 I was answering the guy before your post with that line :)
Post Reply