Page 1 of 1

Simplyfying a Timeinterval MDX subset?

Posted: Thu Aug 15, 2013 11:47 am
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

Re: Simplyfying a Timeinterval MDX subset?

Posted: Thu Aug 15, 2013 12:03 pm
by tomok
Why does it need to be dynamic? Why not just create a static subset of those elements?

Re: Simplyfying a Timeinterval MDX subset?

Posted: Thu Aug 15, 2013 2:54 pm
by Darkhorse
its written in a TI and it doesnt need to be dynamic but i want to delete it after ive done

Re: Simplyfying a Timeinterval MDX subset?

Posted: Thu Aug 15, 2013 3:19 pm
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;

Re: Simplyfying a Timeinterval MDX subset?

Posted: Thu Aug 15, 2013 3:26 pm
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.

Re: Simplyfying a Timeinterval MDX subset?

Posted: Thu Aug 15, 2013 4:24 pm
by Wim Gielis
Dynamic, yet simple:

{[}TimeIntervals].[0M00]:[}TimeIntervals].[1M00]}

Re: Simplyfying a Timeinterval MDX subset?

Posted: Sun Aug 25, 2013 11:25 pm
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

Re: Simplyfying a Timeinterval MDX subset?

Posted: Mon Aug 26, 2013 6:59 am
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.

Re: Simplyfying a Timeinterval MDX subset?

Posted: Tue Aug 27, 2013 8:59 pm
by Darkhorse
Sorry Wim I totally agree m8 I was answering the guy before your post with that line :)