static subsets saved disappears

Post Reply
Analytics123
Posts: 128
Joined: Tue May 23, 2017 12:45 pm
OLAP Product: Tm1
Version: 9.5
Excel Version: 2010

static subsets saved disappears

Post by Analytics123 »

Hi ,

We have static subsets disappearing in few dimension . we are not deleting any elements , while the dimension is updated we just unwind the dimension elements and re add the elements.

Also I could see the subset data in the data folder but opening up the editor showing blank for subsets.

Is this a bug in tm1 10.1.1 , we have no clue why the elements would be blank .

Thanks
tomok
MVP
Posts: 2831
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: static subsets saved disappears

Post by tomok »

What you are seeing is what happens when you delete elements and add them back in a TI process. You're probably not "unwinding" them like you say you are. If you are unwinding, why would you need to add them back? You just re-establish parent-child relationships.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: static subsets saved disappears

Post by Wim Gielis »

Analytics123 wrote: Wed Nov 01, 2017 5:27 pm We have static subsets disappearing in few dimension .
Please try to be clear. Your subsets aren’t disappearing it’s the elements within the subsets that disappear.
Best regards,

Wim Gielis

IBM Champion 2024
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
User avatar
Steve Rowe
Site Admin
Posts: 2410
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: static subsets saved disappears

Post by Steve Rowe »

As well as the delete mentioned by Tom you can see issues in this space if you delete and recreate an alias that is being used by the subset
Technical Director
www.infocat.co.uk
Analytics123
Posts: 128
Joined: Tue May 23, 2017 12:45 pm
OLAP Product: Tm1
Version: 9.5
Excel Version: 2010

Re: static subsets saved disappears

Post by Analytics123 »

yes elements with in subsets are disappearing . we are not deleting the element any where .
Analytics123
Posts: 128
Joined: Tue May 23, 2017 12:45 pm
OLAP Product: Tm1
Version: 9.5
Excel Version: 2010

Re: static subsets saved disappears

Post by Analytics123 »

dim update customers

first unwinding code :

DIMENSIONSORTORDER(vDim,'','','ByHierarchy','ASCENDING');

vMax = DIMSIZ(vDim);
vCount = 1;

WHILE (vCount <= vMax);
vElem = DIMNM(vDim, vCount);

vMaxParents = ELPARN(vDim, vElem);
WHILE (vMaxParents>0);

vParent = ELPAR(vDim, vElem, vMaxParents);
DimensionElementComponentDelete(vDim, vParent, vElem);
vMaxParents = vMaxParents - 1;
END;

vCount = vCount + 1;
END;


Then updating parent child relation from load file .

# Customers SoldTo
DIMENSIONELEMENTINSERT('Customers SoldTo','','All Regions','c');
DIMENSIONELEMENTINSERT('Customers SoldTo','','All Countries','c');
DIMENSIONELEMENTINSERT('Customers SoldTo','','z_Orphans','c');
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo','All Regions', 'z_Orphans',1.000000);

DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo','All Regions',SoldToRegion,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToRegion,SoldToDist,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToDist,vSoldToSubRegion,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',vSoldToSubRegion,SoldToRep,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToRep,SoldToCustomer,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Customers SoldTo',SoldToCustomer,ShipToCustomer,1.000000);

Thats the code we have .
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: static subsets saved disappears

Post by lotsaram »

Analytics123 wrote: Thu Nov 02, 2017 12:27 pm Thats the code we have .
Are you sure? Like really, REALLY sure? Because if elements are being removed from a static subset (which isn't being edited in any way), then the only way that is happening is if the elements are being deleted and then re-added to the dimension. Have you double (and triple) checked that there isn't any other process also editing the same dimension?

Also much better practice to loop backwards from max to 0 whenever removing items from a list.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply