Deleting history in TM1 Cube

Post Reply
vins
Posts: 35
Joined: Wed Jul 31, 2013 4:54 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Deleting history in TM1 Cube

Post by vins »

Hi experts,

Kindly let me know how to delete history of records in TM1 Cube using TI process?

Thanks
Wim Gielis
MVP
Posts: 3241
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: Deleting history in TM1 Cube

Post by Wim Gielis »

You will need the

Code: Select all

ViewZeroOut 
function, applied to a view on a cube. Use the

Code: Select all

ViewCreate
function, and a bunch of other functions.
Most probably, the view creation has been scripted in the same process, but that's not needed.
It could even be a view that you save manually in the cube viewer (it's also possible to clear the data manually in the cube viewer).
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
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: Deleting history in TM1 Cube

Post by EvgenyT »

Simple example along these lines:

# Create View
sView = cTI|NumberToString(Rand*Rand);

IF( ViewExists( cubDestination, sView ) = 1 );
ViewDestroy( cubDestination, sView );
ENDIF;

ViewCreate( cubDestination, sView );

ViewZeroOut( cubDestination, sView );

Obviously you will have to create subsets for dimension with elements you want to clear e.g. Jun 2013 Budget data..

Check out this link with all Subset function:

http://pic.dhe.ibm.com/infocenter/ctm1/v9r5m0/index.jsp

Try to write a simple ZeroOut process and when you get stuck let us now.

Thanks

ET
vins
Posts: 35
Joined: Wed Jul 31, 2013 4:54 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: Deleting history in TM1 Cube

Post by vins »

@EvgenyT : Thanks a ton.. I was able to achieve my requirement.
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: Deleting history in TM1 Cube

Post by EvgenyT »

You are welcome ;)
Post Reply