How can i use subset in cellput/cellget function.

Post Reply
tcelkk
Posts: 3
Joined: Mon Nov 21, 2016 6:44 am
OLAP Product: IBM TM1
Version: 10.2.2
Excel Version: 2010
Location: Turkey

How can i use subset in cellput/cellget function.

Post by tcelkk »

Hi,
Can i do this? How can i call my subsets these functions?
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: How can i use subset in cellput/cellget function.

Post by tomok »

Why would you want to do this? Those functions are to get the resultant data from a single intersection in the cube. A subset would entail multiple intersections and would thus be NA. Are you talking about retrieving the sum of the intersections in a subset, much like the undocumented feature whereby you can pass a subset to a DBRW formula? I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try. Just pass the subset name in one of the parameters instead of the element name.

As to CELLPUTN using a subset wouldn't make any logical sense. How would TM1 know which intersection the data should be written to? Think about it.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
tcelkk
Posts: 3
Joined: Mon Nov 21, 2016 6:44 am
OLAP Product: IBM TM1
Version: 10.2.2
Excel Version: 2010
Location: Turkey

Re: How can i use subset in cellput/cellget function.

Post by tcelkk »

Hi tomok,

Thanks your answer.
İ need to do this because İ have to copy my data in cube from one element to another element. I create my view and some subsets in prolog. But i dont use subsets in these functions.
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: How can i use subset in cellput/cellget function.

Post by tomok »

tcelkk wrote:Hi tomok,

Thanks your answer.
İ need to do this because İ have to copy my data in cube from one element to another element. I create my view and some subsets in prolog. But i dont use subsets in these functions.
If the view you created in the prolog is the data source for the TI process then the TI will cycle through all the intersections for you in the Data tab and you don't have to use a CELLGETN as the data will already be in a variable for you. You just need to write a CELLPUTN to put it in the destination intersection. This is pretty basic TI stuff and is covered in the User Manual quite adequately.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
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: How can i use subset in cellput/cellget function.

Post by Wim Gielis »

tomok wrote:I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try
It works fine. But it's undocumented by IBM.
http://users.skynet.be/fa436118/wim/tm1 ... dup_EN.htm
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
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: How can i use subset in cellput/cellget function.

Post by tomok »

Wim Gielis wrote:
tomok wrote:I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try
It works fine. But it's undocumented by IBM.
http://users.skynet.be/fa436118/wim/tm1 ... dup_EN.htm
Interesting, but I imagine it would need to be a public subset and not a private one.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
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: How can i use subset in cellput/cellget function.

Post by Wim Gielis »

tomok wrote:
Wim Gielis wrote:
tomok wrote:I don't know if that also works for CELLGETN, highly doubt it, but you can always give it a try
It works fine. But it's undocumented by IBM.
http://users.skynet.be/fa436118/wim/tm1 ... dup_EN.htm
Interesting, but I imagine it would need to be a public subset and not a private one.
No, private subsets also work...
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
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: How can i use subset in cellput/cellget function.

Post by tomok »

Wim Gielis wrote:No, private subsets also work...
How would TM1 know where to get the private subset if the TI was kicked off by a chore? Those don't execute with a user ID.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
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: How can i use subset in cellput/cellget function.

Post by Wim Gielis »

tomok wrote:
Wim Gielis wrote:No, private subsets also work...
How would TM1 know where to get the private subset if the TI was kicked off by a chore? Those don't execute with a user ID.
Hello Tom,

I did not run the process in a chore, but for myself, and the private subset was also one of myself.

If run in a chore, the result is an error message, the usual Invalid key error.
If run manually with a private subset for another user, same error.
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
tcelkk
Posts: 3
Joined: Mon Nov 21, 2016 6:44 am
OLAP Product: IBM TM1
Version: 10.2.2
Excel Version: 2010
Location: Turkey

Re: How can i use subset in cellput/cellget function.

Post by tcelkk »

If the view you created in the prolog is the data source for the TI process then the TI will cycle through all the intersections for you in the Data tab and you don't have to use a CELLGETN as the data will already be in a variable for you. You just need to write a CELLPUTN to put it in the destination intersection. This is pretty basic TI stuff and is covered in the User Manual quite adequately.

Which variable? I didnt get.

This is my cube i created in prolog.
//PROLOG
vCube='Sample';
vViewSource='ViewSource';
vDim1='V1';
ViewCreate(vCube,vViewSource);
SubsetCreate(vDim1,vSub1);
SubsetElementInsert(vDim1,vSub1, V_source,1); //V_source is a paramater
ViewSubsetAssign(vCube,vViewSource,vDim1, vSub1);
ViewSubsetAssign(vCube,vViewSource,'Material', 'Material_Level_0');// this is an another subset i used it

vViewTarget='ViewTarget';
vDim2='V2';
ViewCreate(vCube,vViewTarget);
SubsetCreate(vDim2,vSub2);
SubsetElementInsert(vDim1,vSub1, V_target,1); //V_target is a also paramater
ViewSubsetAssign(vCube,vViewSource,'Material', 'Material_Level_0');

//DATA
For example
CellPutN(?,vCube ,V_target, '000', 'Currency',Material,'Element1','Measure_1');

I have a lot dimension in the cube i dont create subset all. Just writing in CELGETN.
How can i do this without CELGETN? I dont know. Maybe i use the wrong way..
User avatar
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: How can i use subset in cellput/cellget function.

Post by Steve Rowe »

Hi,

You seem to be missing some really fundamental stuff such that we can't understand the question you are asking. The pieces of terminology you are using do not make any sense in the context you are using them.

You really need to spend some time on training or playing with some simple examples to get to the point where we can all speak the same technical language.

If you are trying to set a view to be a datasource of a TI and then reference that view in the data tab then you don't need to say anything special about the dimensions you are not assigning to the view. They will just show up as views in the datasource tab. You will need to point the TI at a dummy view (create via the right click export as ascii function) in order to get access to the datasource tab.

Suggest that you also try and talk more generally about what you are trying to achieve, rather than the single line of code you are struggling with.

HTH
Technical Director
www.infocat.co.uk
Post Reply