Zeroout Process

Post Reply
Abinaya
Posts: 57
Joined: Fri Sep 17, 2010 11:57 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2003

Zeroout Process

Post by Abinaya »

Hi
I want to ZeroOut a cube based on 4 parameters. The parameters are fields in the excel data source.
What is the best way to do it?

If I include the ZeroOut process in the prolog then I can't retrive the parameter values ?


regards,

Abi
User avatar
Michel Zijlema
Site Admin
Posts: 713
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: Zeroout Process

Post by Michel Zijlema »

Abinaya wrote:Hi
I want to ZeroOut a cube based on 4 parameters. The parameters are fields in the excel data source.
What is the best way to do it?

If I include the ZeroOut process in the prolog then I can't retrive the parameter values ?


regards,

Abi
I assume you're referring to variables (data in the data source) instead of parameters.
Another assumptions is that the value of the regarding 4 variables is the same on each row.
What you could do in that case is:
- setup the ZeroOut view on the Prolog tab, without assigning the element selection subsets (for the 4 variables) to the view,
- initialize a flag variable ZeroOut = 1 on the Prolog tab
- on the MetaData (or Data if no metadata manipulation is required) you can have a conditional statement like:
IF(ZeroOut = 1);
assign variable values to ZeroOut view selection subsets
ZeroOut = 0;
ENDIF;
The above is partially pseudo code and will only work when my two assumptions are correct...

Michel
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: Zeroout Process

Post by tomok »

Abinaya wrote:Hi
I want to ZeroOut a cube based on 4 parameters. The parameters are fields in the excel data source.
What is the best way to do it?

If I include the ZeroOut process in the prolog then I can't retrive the parameter values ?


regards,

Abi
What I do in the scenario where the client wants to load only certain versions, or months, or whatever, and those are defined in the dimensionality, and they don't want to have to answer a parameter dialog box is split it into two processes. The first process reads the source and builds subsets for each of the affected dimensions based on what is found in the data. The second process builds the view, based on the previously built subsets, does a ViewZeroOut, and then loads the data. The only caveat here is that the source data has to be complete. What this means is that if you erase a portion of the cube, based on what is found in the source, then you need to make sure the source has a compete replacement of what you erased. This is a business issue, not a technical one, but needs to be understood and handled properly.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Abinaya
Posts: 57
Joined: Fri Sep 17, 2010 11:57 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2003

Re: Zeroout Process

Post by Abinaya »

tomok wrote:
Abinaya wrote:Hi
I want to ZeroOut a cube based on 4 parameters. The parameters are fields in the excel data source.
What is the best way to do it?

If I include the ZeroOut process in the prolog then I can't retrive the parameter values ?


regards,

Abi
What I do in the scenario where the client wants to load only certain versions, or months, or whatever, and those are defined in the dimensionality, and they don't want to have to answer a parameter dialog box is split it into two processes. The first process reads the source and builds subsets for each of the affected dimensions based on what is found in the data. The second process builds the view, based on the previously built subsets, does a ViewZeroOut, and then loads the data. The only caveat here is that the source data has to be complete. What this means is that if you erase a portion of the cube, based on what is found in the source, then you need to make sure the source has a compete replacement of what you erased. This is a business issue, not a technical one, but needs to be understood and handled properly.
Thanks.I did like what you mentioned here. I have few problems.

When I built a subset for the one of the dimension I am having duplicated elements? How do I create subset without duplicated elements?

Where should I call the second process? Epilog of the first process passing those 4 variables?

regards,

Abi
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Zeroout Process

Post by lotsaram »

Usually you build a temporary dimension (when using dimensionelementinsert you can't add an element to a dimension more than once). Then on the epilogue you loop through the temp dims to build subsets in the original dims and lastly delete the temp dims.
Abinaya
Posts: 57
Joined: Fri Sep 17, 2010 11:57 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2003

Re: Zeroout Process

Post by Abinaya »

lotsaram wrote:Usually you build a temporary dimension (when using dimensionelementinsert you can't add an element to a dimension more than once). Then on the epilogue you loop through the temp dims to build subsets in the original dims and lastly delete the temp dims.
Thanks. I will try that.
Post Reply