Time period Dimension

Post Reply
manu0521
Posts: 95
Joined: Wed Nov 26, 2014 8:32 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2010

Time period Dimension

Post by manu0521 » Tue Nov 03, 2020 10:06 pm

Hi ,

We had this time period dimension as a static dimension and add the year and months once a year.

Now I am trying to automate using a TI to build this .

For few dimensions we remove the hierarchies to the lowest level and then readd them .Since elements might switch positons.

For time ,Am i good with just adding the members .I am planning to just check the current year column value from the source table with system year and then add only the members until the current year.

Thanks,

tomok
MVP
Posts: 2770
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: Time period Dimension

Post by tomok » Tue Nov 03, 2020 10:12 pm

manu0521 wrote:
Tue Nov 03, 2020 10:06 pm
Hi ,

We had this time period dimension as a static dimension and add the year and months once a year.

Now I am trying to automate using a TI to build this .

For few dimensions we remove the hierarchies to the lowest level and then readd them .Since elements might switch positons.

For time ,Am i good with just adding the members .I am planning to just check the current year column value from the source table with system year and then add only the members until the current year.

Thanks,
I have my time dimension in an .XDI sheet and I can add a new year in literally less than five minutes. Copy and paste and then replace the year value. Voila. I would never ever get payback in time savings for the time I would waste building a TI to do this. YMMV.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

Wim Gielis
MVP
Posts: 2588
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.8
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Time period Dimension

Post by Wim Gielis » Tue Nov 03, 2020 11:29 pm

I would loop from a pStartYear until a pEndYear (2 parameters to the process).
Within that loop, I would loop over 12 periods.
A couple of DimensionElementInsert's and DimensionElementComponentAdd's (or the Hierarchy equivalents) and that's basically it.
In the Epilog tab, add a few attributes.
I would think that with 90 posts here and having joined the forum in 2014, this would be an easy task.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 117 TM1 articles and a lot of custom code
Newest blog article: Using TI to change elemant names, like Biden to Trump

tomok
MVP
Posts: 2770
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: Time period Dimension

Post by tomok » Wed Nov 04, 2020 12:02 pm

Another thing about the XDI. You can very easily control the ordering of the elements. Doing this via TI is extremely difficult. Our users like to have the current year at the top of the time dimension by default. With an XDI I can move that year to the top and save and it's done. I know I can create a subset that has this but once the user clicks on the Show All everything goes back to the default. It is very handy to have the elements in the dimension in the optimal order to start with. An XDI is the easiest way to accomplish this.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

Wim Gielis
MVP
Posts: 2588
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.8
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Time period Dimension

Post by Wim Gielis » Wed Nov 04, 2020 2:21 pm

I bet not many of us have used the second argument (Insertion point) in a function like DimensionElementInsert :D For me, I can count those situations on 1 hand.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 117 TM1 articles and a lot of custom code
Newest blog article: Using TI to change elemant names, like Biden to Trump

tomok
MVP
Posts: 2770
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: Time period Dimension

Post by tomok » Wed Nov 04, 2020 2:51 pm

Wim Gielis wrote:
Wed Nov 04, 2020 2:21 pm
I bet not many of us have used the second argument (Insertion point) in a function like DimensionElementInsert :D For me, I can count those situations on 1 hand.
I know about that one but the problem for me isn't the position of the newly inserted elements, it's the ability to re-order the existing ones. I can do that with XDI but there isn't a way to do that with TI unless I remove the element and re-add, which we all know is a no-no if you have data.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

Wim Gielis
MVP
Posts: 2588
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.8
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Time period Dimension

Post by Wim Gielis » Wed Nov 04, 2020 3:10 pm

tomok wrote:
Wed Nov 04, 2020 2:51 pm
Wim Gielis wrote:
Wed Nov 04, 2020 2:21 pm
I bet not many of us have used the second argument (Insertion point) in a function like DimensionElementInsert :D For me, I can count those situations on 1 hand.
I know about that one but the problem for me isn't the position of the newly inserted elements, it's the ability to re-order the existing ones. I can do that with XDI but there isn't a way to do that with TI unless I remove the element and re-add, which we all know is a no-no if you have data.
I haven't tested this, nor do I say it's intuitive and needed and easy, but if we do a DimensionDeleteAllElements and insert them back in the correct sequence - I *think* this could work.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 117 TM1 articles and a lot of custom code
Newest blog article: Using TI to change elemant names, like Biden to Trump

User avatar
PavoGa
Community Contributor
Posts: 465
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Cleveland, Tennessee

Re: Time period Dimension

Post by PavoGa » Mon Nov 09, 2020 10:46 pm

tomok wrote:
Wed Nov 04, 2020 2:51 pm
Wim Gielis wrote:
Wed Nov 04, 2020 2:21 pm
I bet not many of us have used the second argument (Insertion point) in a function like DimensionElementInsert :D For me, I can count those situations on 1 hand.
I know about that one but the problem for me isn't the position of the newly inserted elements, it's the ability to re-order the existing ones. I can do that with XDI but there isn't a way to do that with TI unless I remove the element and re-add, which we all know is a no-no if you have data.
Not necessarily with alternate hierarchies. Remove the N-levels in the target hierarchy and the Leaves hierarchy protects against loss. Not saying I do it that way (old school unwind and rebuild), but that is one of the advantages of the alternate hierarchies.
Ty
Cleveland, TN

User avatar
PavoGa
Community Contributor
Posts: 465
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Cleveland, Tennessee

Re: Time period Dimension

Post by PavoGa » Mon Nov 09, 2020 10:50 pm

Wim Gielis wrote:
Wed Nov 04, 2020 3:10 pm

I haven't tested this, nor do I say it's intuitive and needed and easy, but if we do a DimensionDeleteAllElements and insert them back in the correct sequence - I *think* this could work.
I believe you are correct in your thinking. As long as all the dimension changes occur in the prolog and METADATA procedures, the underlying data is kept as the changes occur on a copy of the dimension, not the actual dimension. Think I tried this some years back, but frankly, I manage this in other ways.
Ty
Cleveland, TN

User avatar
paulsimon
MVP
Posts: 771
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Time period Dimension

Post by paulsimon » Tue Nov 24, 2020 10:31 pm

Hi

This post might help you

viewtopic.php?f=21&t=15596

It generates a time dimension using TI with the elements in the right order.

Regards

Paul Simon

Post Reply