Automate Viewzero out using TI Process-Bit urgent

Post Reply
sathishh.mk
Posts: 38
Joined: Mon Dec 20, 2010 5:02 am
OLAP Product: Cognos TM1
Version: 9.4 and 9.5
Excel Version: 2003 and 2007

Automate Viewzero out using TI Process-Bit urgent

Post by sathishh.mk »

Hi All,

we have a requirement to automate zeroout the views.
We have 14 dimension in the cube.

Here is the criteria to Zeroout.

We have Version dimension with different versions and year dimension starting the years with 2008 to 2013.

For the Actuals version => zero out all data that are NOT under 2013 year.
For all other versions => zero out all data that are NOT for the year that the version pertains too.

Some examples:
For ‘Forecast’ cube and version ‘Actuals’ zero out all data for prior years: 2009,2010,2011,2012.
For ‘Historical Forecast’ cube and version FY11 Actuals Archived’ zero out all data for prior years: 2009,2010,2012
For ‘Historical Forecast’ cube and version FY12 Actuals Archived’ zero out all data for prior years: 2009,2010,2011.

Can you please help me to build the Automate viewzeroout script using TI Process.

Thanks in Advance !!

Regards,
Sathish
User avatar
jim wood
Site Admin
Posts: 3961
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: Automate Viewzero out using TI Process-Bit urgent

Post by jim wood »

You need to use ViewCreate, SubSetCreate, SubsetElementInsert and ViewSubsetAssign to create a view to use in clearing out the data, then use ViewZeroOut. For more information about each of the functions above look in the TM1 ref guide.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Automate Viewzero out using TI Process-Bit urgent

Post by David Usherwood »

Suggest you build specific views for each of the areas you want to clear using the 'Cube\Export Text Data' approach. Should take about 15 minutes.
sathishh.mk
Posts: 38
Joined: Mon Dec 20, 2010 5:02 am
OLAP Product: Cognos TM1
Version: 9.4 and 9.5
Excel Version: 2003 and 2007

Re: Automate Viewzero out using TI Process-Bit urgent

Post by sathishh.mk »

Hi All,

Thanks for replies.
Presently i am using below code for SubSetCreate, SubsetElementInsert,ViewCreate and ViewSubsetAssign.

# 1. Creating subsets with desired elements:
SUBSETCREATE('Historical Version','HV_ZeroOut');
SUBSETELEMENTINSERT('Historical Version','HV_ZeroOut','FY11 Actuals Archived',1);

SUBSETCREATE('Year','Y_ZeroOut');
SUBSETELEMENTINSERT('Year','Y_ZeroOut','2010',1);
# 2. Create view & assign subsets
VIEWCREATE('Historical Forecast','Vw_ZeroOut');
VIEWSUBSETASSIGN('Historical Forecast','Vw_ZeroOut','Historical Version','HV_ZeroOut');
VIEWSUBSETASSIGN('Historical Forecast','Vw_ZeroOut','Year','Y_ZeroOut');
# 3. Zero out
VIEWZEROOUT('Historical Forecast','Vw_ZeroOut');
# 4. Removing once zeroout completed:
VIEWDESTROY('Historical Forecast','Vw_ZeroOut');
SUBSETDESTROY('Historical Version','HV_ZeroOut');
SUBSETDESTROY('Year','Y_ZeroOut');

It is working as expected,but our requirement is user has to enter any of the version as parameter(FY11 Actuals Archived - currently hard coded) then according to that version TI Process has to perform SubSetCreate, SubsetElementInsert ,ViewCreate,and ViewSubsetAssign actions as per criteria:

For the Actuals version => zero out all data that are NOT under 2013 year.
For all other versions => zero out all data that are NOT for the year that the version pertains too.

Some examples:
For ‘Forecast’ cube and version ‘Actuals’ zero out all data for prior years: 2009,2010,2011,2012.
For ‘Historical Forecast’ cube and version ‘FY11 Actuals Archived’ zero out all data for prior years: 2009,2010,2012
For ‘Historical Forecast’ cube and version ‘FY12 Actuals Archived’ zero out all data for prior years: 2009,2010,2011.

in the above example user can enter the ‘FY11 Actuals Archived’ version as parameter then TI has build the viewS for the below combination and view zero out.

Cubename Version Year
Historical Forecast FY11 Actuals Archived 2008
Historical Forecast FY11 Actuals Archived 2009
Historical Forecast FY11 Actuals Archived 2010
Historical Forecast FY11 Actuals Archived 2012

Please help me out on this.

Regards,
Sathish
User avatar
jim wood
Site Admin
Posts: 3961
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: Automate Viewzero out using TI Process-Bit urgent

Post by jim wood »

Have you using parameters to help the users make the selections?
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
sathishh.mk
Posts: 38
Joined: Mon Dec 20, 2010 5:02 am
OLAP Product: Cognos TM1
Version: 9.4 and 9.5
Excel Version: 2003 and 2007

Re: Automate Viewzero out using TI Process-Bit urgent

Post by sathishh.mk »

Yes Jim,

We are using parameters to help them users to select their own versions.
But below example shows hardcoded versions.This is just for reference what i am doing for the views.

Regards,
Sathish
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: Automate Viewzero out using TI Process-Bit urgent

Post by Harvey »

You might want to check out Bedrock -- it's a bit of a learning curve at first, but you can zero out an arbitrary area in a cube in just a few lines of code. It supports a lot of other common functions as well.
Take your TM1 experience to the next level - TM1Innovators.net
User avatar
jim wood
Site Admin
Posts: 3961
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: Automate Viewzero out using TI Process-Bit urgent

Post by jim wood »

Not a bad shout at all. Here is the link to the site to save you have to trawl through google:

http://www.bedrocktm1.org
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply