Move data from one group to another group in an organization dimension
-
- Posts: 8
- Joined: Mon Sep 14, 2015 10:00 am
- OLAP Product: Cognos TM1
- Version: 10-2-0
- Excel Version: 2013
Move data from one group to another group in an organization dimension
Hi,
The organization dimension I am using is as follows:
A --> B --> C
There are job(positions) and job code dimensions defined.
Now my requirement is as follows.
For example the group C is split into two groups C and C1. If there are 200 positions against C then out of these 50 have to be moved to C1. I want this process to be automated. In the new process business will be entering the parameters like From Org Code, To Org Code, Job Code and Number of positions to be moved.
Can anyone please help me in writing the code for this?
Thanks & Regards,
Jeshwanth
The organization dimension I am using is as follows:
A --> B --> C
There are job(positions) and job code dimensions defined.
Now my requirement is as follows.
For example the group C is split into two groups C and C1. If there are 200 positions against C then out of these 50 have to be moved to C1. I want this process to be automated. In the new process business will be entering the parameters like From Org Code, To Org Code, Job Code and Number of positions to be moved.
Can anyone please help me in writing the code for this?
Thanks & Regards,
Jeshwanth
-
- MVP
- Posts: 3240
- 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: Move data from one group to another group in an organization dimension
What TI functions did you already try ?
DimensionElementComponentAdd and DimensionElementComponentDelete seem to be the ones you will need.
Then you can parameterize the arguments in the 2 functions based on user input.
DimensionElementComponentAdd and DimensionElementComponentDelete seem to be the ones you will need.
Then you can parameterize the arguments in the 2 functions based on user input.
Last edited by Wim Gielis on Sun Dec 13, 2015 6:31 pm, edited 1 time in total.
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
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
-
- Posts: 8
- Joined: Mon Sep 14, 2015 10:00 am
- OLAP Product: Cognos TM1
- Version: 10-2-0
- Excel Version: 2013
Re: Move data from one group to another group in an organization dimension
As I am new to TM1, i have no knowledge about what to use.
I need help from scratch. Please give me the good solution.
please do the needful.
Regards,
Jeshwanth
I need help from scratch. Please give me the good solution.
please do the needful.
Regards,
Jeshwanth
-
- MVP
- Posts: 3240
- 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: Move data from one group to another group in an organization dimension
Did you really have a look in the TI help files ? Do you know the arguments of the 2 functions above ?
Generally, a dimension name, the old parent's element name, the new parent's element name, the child element name.
Please play around by copy/paste the functions from the help files and changing the names into hardcoded values. (like your dimension name, element names, ...)
Generally, a dimension name, the old parent's element name, the new parent's element name, the child element name.
Please play around by copy/paste the functions from the help files and changing the names into hardcoded values. (like your dimension name, element names, ...)
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
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
-
- Posts: 8
- Joined: Mon Sep 14, 2015 10:00 am
- OLAP Product: Cognos TM1
- Version: 10-2-0
- Excel Version: 2013
Re: Move data from one group to another group in an organization dimension
I have gone through the above functions. But that doesn't help me.
Actually I am having Organization Structure like this:
XYZ (Company Name) --> AA01 (Dir Name) --> AB01, AC01, AD01 (Group Names)
I am also having a Job(Postions) dimension and a Job Desc No (JD No) dimension.
I have used a lookup cube to show the applicable jobs for each group and assigned them using a MDX Expression.
Now my requirement is something like this.
There is a need to move positions data from one org code to another org code when there are organization changes.For example the group AD01 is split into two groups AD01 and AD02. If there are 200 positions against AD01 then out of these 50 have to be moved to AD02. I want this process to be automated. In the new process business will be entering the parameters like From Org Code, To Org Code, Job Code (JD No.) and Number of positions to be moved.
Following are the possible scenarios:
1. Move data from One group to Multiple Groups & from Multiple Groups to One Group
2. Move data from One Group to New Group
Please do the needful. I am struck with the solution. If possible give me the solution step by step as I am new to TM1.
Thanks & Regards,
Jeshwanth
Actually I am having Organization Structure like this:
XYZ (Company Name) --> AA01 (Dir Name) --> AB01, AC01, AD01 (Group Names)
I am also having a Job(Postions) dimension and a Job Desc No (JD No) dimension.
I have used a lookup cube to show the applicable jobs for each group and assigned them using a MDX Expression.
Now my requirement is something like this.
There is a need to move positions data from one org code to another org code when there are organization changes.For example the group AD01 is split into two groups AD01 and AD02. If there are 200 positions against AD01 then out of these 50 have to be moved to AD02. I want this process to be automated. In the new process business will be entering the parameters like From Org Code, To Org Code, Job Code (JD No.) and Number of positions to be moved.
Following are the possible scenarios:
1. Move data from One group to Multiple Groups & from Multiple Groups to One Group
2. Move data from One Group to New Group
Please do the needful. I am struck with the solution. If possible give me the solution step by step as I am new to TM1.
Thanks & Regards,
Jeshwanth
-
- Posts: 26
- Joined: Tue Feb 03, 2015 10:22 am
- OLAP Product: IBM Cognos BI
- Version: 10.2
- Excel Version: Excel 2010
Re: Move data from one group to another group in an organization dimension
Use this code in your existing code
Delete all the consolidated element in your dimesnion first .
code in prolog would something like this
nSize = DIMSIZ( Dim_Name );
nCount = 1;
While( nCount <= nSize );
sMem = DIMNM( Dim_Name, nCount);
If( DTYPE( Dim_Name, sMem ) @= 'C' );
DimensionElementDelete( Dim_Name, sMem );
else;
nCount = nCount + 1;
endif;
nSize = DIMSIZ( Dim_Name );
END;
then in metadata recreate hierarchies like this
DIMENSIONELEMENTINSERT(Dim_Name,'',A,'c');
DIMENSIONELEMENTINSERT(Dim_Name,'',B,'c');
DIMENSIONELEMENTINSERT(Dim_Name,'',C,'c');
DIMENSIONELEMENTCOMPONENTADD(Dim_Name,A,B,1.000000);
DIMENSIONELEMENTCOMPONENTADD(Dim_Name,B,C,1.000000);
Delete all the consolidated element in your dimesnion first .
code in prolog would something like this
nSize = DIMSIZ( Dim_Name );
nCount = 1;
While( nCount <= nSize );
sMem = DIMNM( Dim_Name, nCount);
If( DTYPE( Dim_Name, sMem ) @= 'C' );
DimensionElementDelete( Dim_Name, sMem );
else;
nCount = nCount + 1;
endif;
nSize = DIMSIZ( Dim_Name );
END;
then in metadata recreate hierarchies like this
DIMENSIONELEMENTINSERT(Dim_Name,'',A,'c');
DIMENSIONELEMENTINSERT(Dim_Name,'',B,'c');
DIMENSIONELEMENTINSERT(Dim_Name,'',C,'c');
DIMENSIONELEMENTCOMPONENTADD(Dim_Name,A,B,1.000000);
DIMENSIONELEMENTCOMPONENTADD(Dim_Name,B,C,1.000000);
-
- Posts: 8
- Joined: Mon Sep 14, 2015 10:00 am
- OLAP Product: Cognos TM1
- Version: 10-2-0
- Excel Version: 2013
Re: Move data from one group to another group in an organization dimension
Even this didn't help my requirement.
I have tried this, but it doesn't work.
Regards,
Jeshwanth
I have tried this, but it doesn't work.
Regards,
Jeshwanth
- qml
- MVP
- Posts: 1097
- 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: Move data from one group to another group in an organization dimension
Hi Jesh19. Welcome to the forum. You will do yourself a big favour if you read this and try to apply the rules outlined there to your posts. Having limited time every day to browse the forum I would rather spend my time helping someone who I instantly know how to help than going through the painful process of extracting information out of a poster that should have provided it in the first place. Pay extra attention to the following 4 points and hopefully you will realise why they are there:
Request for assistance guidelines (PLEASE READ) wrote:2) Ensure that you specify the component of the software that you're having a problem with. If someone states that they have a problem with (say) number formatting, people need to know whether that's in Cube Viewer, Web, EV, the API, or wherever.
3) Try to make the question as specific as possible. A general question like "How do I write a rule?" is difficult to answer without copying out the whole of the user manual. A question like "I have a payroll cube which contains the following dimensions {details} and a general ledger cube which contains the following dimensions {details}, and although I've read through the Rules Guide I'm still not sure how to write a rule to give me average sales per employee" is far more likely to get the answer your need.
4) Similarly if you're getting unexpected results, specifics of what you're running, how, and what results you're getting will yield a more valuable response than "I'm running a T.I. but my code doesn't work properly". If you're getting an error, please be specific about what the error is (full details, not just "a runtime error" or "process terminated with errors"), and the circumstances under which it's occurring. But remember that even if you do specify the exact error message, it's not likely to be helpful unless you provide the context for it; which part of the software the error is occurring in (point 2 above), and what, specifically, you were doing at the time.
5) For Rules and TurboIntegrator processes, posting the actual code and the real names of and structures of your cubes, dimensions and elements will be a thousand times more useful than an attempted description of them. You don't need to post real data, but the real code is needed. Pseudo code is obviously not "the real code". When you post something like "Suppose I have cube A and Cube B, and my rule is ['value'] = N:DB('CubeA', 'dim1, dim2'" etc, then three things happen. One, you reduce the chance that a syntax or typing error will be spotted, which means wasting time bouncing posts back and forth to try to get to the root of the problem. Two, you are usually describing what you think is happening, which may not be what is happening. Three, some more experienced members won't even look at the question because they've had too much time wasted by the first two issues in the past. You can upload entire .pro, .cho or .rux files as attachments if necessary, or just copy and paste the relevant part into your post using the Code tag at the top of the post editing window.
Kamil Arendt
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Move data from one group to another group in an organization dimension
I think some of the responders have gone off on a bit of a blind alley. I think the OP just wants to move data around in the cube.
Suggest the OP reads up on all the TI view manipulation commands.
Step 1. Create the source view and populate it with subsets that contain the parameters you mention.
Step 2. Create the destination view and populate it with subsets that contain the parameters you mention, clear all the data from it.
Step 3. Copy the data from the source to the destination.
Step 4. Delete all the views and subsets you created.
Jeshwanth, the bottom line is you won't find someone to write the above for you. You need to demonstrate that you have put some effort into learning and developing a solution yourself.
Good luck!
Suggest the OP reads up on all the TI view manipulation commands.
Step 1. Create the source view and populate it with subsets that contain the parameters you mention.
Step 2. Create the destination view and populate it with subsets that contain the parameters you mention, clear all the data from it.
Step 3. Copy the data from the source to the destination.
Step 4. Delete all the views and subsets you created.
Jeshwanth, the bottom line is you won't find someone to write the above for you. You need to demonstrate that you have put some effort into learning and developing a solution yourself.
Good luck!
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- Posts: 8
- Joined: Mon Sep 14, 2015 10:00 am
- OLAP Product: Cognos TM1
- Version: 10-2-0
- Excel Version: 2013
Re: Move data from one group to another group in an organization dimension
That doesn't help me. Actually my main concern is about moving of positions from one group element to another.
Previously when this requirement is not there, i have used a lookup cube for showing the available for each group and assigned them using a MDX Expression.
But now, I am stuck with the new requirement.
I would be thankful if anyone helped me out of this issue.
Regards,
Jeshwanth
Previously when this requirement is not there, i have used a lookup cube for showing the available for each group and assigned them using a MDX Expression.
But now, I am stuck with the new requirement.
I would be thankful if anyone helped me out of this issue.
Regards,
Jeshwanth
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Move data from one group to another group in an organization dimension
OK, so the problem is that no one here understands your requirement...Moving elements and moving data in a cube has been outlined to you which seems like it should cover what you are talking about. Suggest you go into greater detail about your requirement....
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- 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: Move data from one group to another group in an organization dimension
I think it's pretty clear what he wants. He wants a TI process that will move certain leaf level elements from one consolidated node to another and he wants someone to spoon feed him the exact code with which to accomplish this.Steve Rowe wrote:OK, so the problem is that no one here understands your requirement...Moving elements and moving data in a cube has been outlined to you which seems like it should cover what you are talking about. Suggest you go into greater detail about your requirement....