Page 1 of 1

ViewZeroOut vs CellPutProportionalSpread?

Posted: Thu Apr 05, 2012 12:13 am
by fleaster
Just curious, for the purpose of clearing out portions of cubes, is there a difference between using the above functions in TI? e.g. any difference in effect in terms of logging, performance, effect on consolidated values etc...?

thanks!

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Thu Apr 05, 2012 12:27 am
by tomok
It doesn't really matter which "might" be faster because you can't use CellPutProportionalSpread to zero out any portion of a cube. You'll get an error message about an invalid function. You have to actually provide a non-zero value to spread.

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Thu Apr 05, 2012 12:34 am
by fleaster
Ahh ok i hadn't actually tested it yet, so just assumed you could send zeroes...

thanks for the quick response that answers that then :)

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Thu Apr 05, 2012 6:03 pm
by Wim Gielis
Hello Tomok

You are not correct on this one I'm afraid.

See here for an article and sample code (go through it and adjust where necessary):
http://users.skynet.be/fa436118/wim/tm1 ... spread.htm

It's the direct link to an article on my personal website.

If I interpret the question in a different way, or I am not correct, please tell me.

Wim

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Fri Apr 06, 2012 12:00 am
by Harvey
Wim Gielis wrote: You are not correct on this one I'm afraid.
Wim
Yeah, I'm pretty sure I used a CellputProportionalSpread to zero out a cube on a POC many years back.

However, I found some odd behaviour and ended up having to ditch it. Where I had negative numbers in the underlying values, the CellputProportionalSpread function would leave behind negative and positive values so that the SUM at the consolidation was 0, but not necessarily the underlying values.

If you think about it, this kinda makes sense. Imagine the simple case: a consolidation with two children. The values of the children are -1 and 1 respectively. A CellPutProportionalSpread call on the consolidation will not change any values, because your consolidation is already zero.

My take away was that you're always much better off to build a proper view and call ViewZeroOut. If it's a complex case where one view doesn't fit, break it down into multiple TI processes and call them sequentially using ExecuteProcess or a chore. This is much more maintainable and guarantees correct results.

This was a very long time ago, so I apologize if my memory is fuzzy on the details. You could do some quick testing to determine the behaviour in the current version of TM1.

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Fri Apr 06, 2012 11:36 am
by fleaster
thanks for the feedback guys re: a consolidated rollup having $0 with offsetting underlying values - makes sense that the proportional spread wouldn't affect it

...ok so i guess i'll be sticking to the viewzeroout in that case... question on this though: when constructing the view, is it necessary to assign subsets to EVERY dimension, or can you just assign a subset to the dimension(s) you're wanting to filter on, and the rest will just be treated as "all elements"...?

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Fri Apr 06, 2012 12:48 pm
by tomok
fleaster wrote:can you just assign a subset to the dimension(s) you're wanting to filter on, and the rest will just be treated as "all elements"...?
Exactly.

Re: ViewZeroOut vs CellPutProportionalSpread?

Posted: Fri Apr 06, 2012 2:07 pm
by Wim Gielis
fleaster wrote:thanks for the feedback guys re: a consolidated rollup having $0 with offsetting underlying values - makes sense that the proportional spread wouldn't affect it

...ok so i guess i'll be sticking to the viewzeroout in that case... question on this though: when constructing the view, is it necessary to assign subsets to EVERY dimension, or can you just assign a subset to the dimension(s) you're wanting to filter on, and the rest will just be treated as "all elements"...?
Hello

I'm working on a little tool to "generate" code. (probably just Excel VBA code to generate a text file containing the code)
Not sure I will get it done and when, but I will be spreading it through my website and this forum. For the general public who wants to gain time here.