How to clear all values

Post Reply
SBrenner
Posts: 8
Joined: Mon Jul 26, 2010 4:06 pm
OLAP Product: IBM Cognos TM1
Version: 9.5.0
Excel Version: 2007

How to clear all values

Post by SBrenner »

Hi,

is there a simple way to clear all values of a dimension entry (without deleting and recreating the dimension entry)?
The purpose is that I get billing data fpr two dimension entry of a cube. Because the delivered data are the complete snapshot of the previous day and values may be exists anymore I wanted to clear all values before importing the data.
I have no way found to simple clear all the values. I tried to remove and recreate the dimension entry, but this will doesn't work well (the dimension entry will be permanently removed from subset).

Does anyone have an idea?

Many thanks in advance

Steve B.
User avatar
jim wood
Site Admin
Posts: 3951
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: How to clear all values

Post by jim wood »

Hi Steve,

Check out the following thread: http://forums.olapforums.com/viewtopic.php?f=3&t=3027

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
User avatar
rkaif
Community Contributor
Posts: 328
Joined: Fri Sep 05, 2008 6:58 pm
OLAP Product: IBM Cognos TM1
Version: 9.1 or later
Excel Version: 2003 or later

Re: How to clear all values

Post by rkaif »

In a TI Process you can use CubeClearData() function which will clear all the values in a cube.

Alternatively, you can also clear a specific portion of a cube using ViewZeroOut() in the Prolog tab of TI Process.
Cheers!
Rizwan Kaif
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: How to clear all values

Post by Steve Vincent »

rkaif wrote:In a TI Process you can use CubeClearData() function which will clear all the values in a cube...
Do what now? What version did that appear in? 9.0 makes no mention of it in the help files...
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
comma
Posts: 82
Joined: Thu Jun 03, 2010 3:50 am
OLAP Product: Cognos TM1
Version: 9.5.0 64-bit
Excel Version: 2003 SP3

Re: How to clear all values

Post by comma »

Steve Vincent wrote:Do what now? What version did that appear in? 9.0 makes no mention of it in the help files...
From 9.5.0 Reference Guide:
CubeClearData
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This clears all of the data in a cube.
This function is much faster than doing an operation such as creating a view to cover the entire
cube, and then doing a ViewZeroOut() to zero out the entire cube.
Note: This call just deletes the cube data, it does not delete and re-create the cube itself. This has
implications when sandboxes are used. If a cube is deleted and then re-created any sandboxes a
user may have will be discarded, since the cube against which those sandboxes were created was
deleted (even though a cube may have been re-created with the same name). If however the Cube-
ClearData() call is used, the sandbox data will still be considered valid, since the cube against which
the sandbox was created continues to exist.
I don't know whether this function exists in version prior to 9.5.0 or not.
Windows Server 2003 Enterprise x64
Windows XP Pro 2002 SP3
Internet Explorer 7
tomok
MVP
Posts: 2832
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 to clear all values

Post by tomok »

comma wrote:I don't know whether this function exists in version prior to 9.5.0 or not.
It does not. It is a great idea and I will definitely use it whenever I build my first model in 9.5.1.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: How to clear all values

Post by Steve Vincent »

I've not looked at 9.5 for a while so thanks for that, interesting to know. I can't think of any of our models where an entire cube is cleared, but handy in a development context certainly.
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
Wim Gielis
MVP
Posts: 3120
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: How to clear all values

Post by Wim Gielis »

Interesting to know. I can use it in some models.

In fact, it replaces the statements:

Code: Select all

ViewCreate('CubeName','MyTempView');
ViewZeroOut('CubeName','MyTempView');
ViewDestroy('CubeName','MyTempView');
But if it is a faster method, that would be a more important reason to start using it.

Thanks.

Wim
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
Post Reply