Page 1 of 1

ViewZeroOut()

Posted: Fri Nov 07, 2014 7:18 pm
by nayitian
Hi there,

I know there are many similar discussions, but I still feel this function is cryptic to me.
I have a cube with 3 dimensions, Version(2015, 2016...), Production line(L1, L2...), and Region(R1, R2...), I created two views <2015>, <2016> as following,
<2015> <2016>
R1 R2 R3 R1 R2 R3
L1 10 10 20 L1 38 25 20
L2 10 10 20 L2 45 43 45
L3 10 10 20 L3 66 75 68

After firing ViewZeroOut(Cube, '2015'), data of both views are cleared out. By looking at the function name, I was expecting <2016> data should be kept.
So, my question is how to clear one version data and keept rest versions intact? Am I using the function correctly?

Thank you in advance.

Re: ViewZeroOut()

Posted: Fri Nov 07, 2014 9:13 pm
by lotsaram
So let me get this straight. In the view you included both the versions 2015 and 2016 and you are surprised that data for both 2015 and 2016 has been cleared.

Re: ViewZeroOut()

Posted: Fri Nov 07, 2014 11:09 pm
by declanr
I am assuming you have created the views manually and have "Version" as a title dimension.
If this is the case and you have a subset assigned to that dimension which contains both elements "2015" and "2016" (i.e if you can choose the other element from the cube viewer title element drop down without going into the subset editor); even though you can only see 1 of the elements - TM1 considers the view to actually contain both when it does the zero out. TM1 is obviously not restricted to the flat view of data that our eyes are.
This isn't naturally obvious hence why most of us create the view and assign all of the elements and subsets in the prolog tab of a TI process.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 5:29 am
by EvgenyT
You need to elaborate how you created the view. Manually or via TI?
If the last being the case, then you need to give the details of your coding. Else ViewZeroOut cleared out the exact area as specified by your dimension subsets.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 2:01 pm
by nayitian
Thank you all for the info above.

I manually created two views, same structures
<2015>
R1 R2 R3
L1
L2
L3
=====================
<2016>
R1 R2 R3
L1
L2
L3
=====================

Subset L.2015(contains L1,L2,L3) is used in view <2015>, subset L.2016(contains L1,L2,L3) is used in view <2016>
Subset R.2015(contains R1,R2,R3) is used in view <2015>, subset R.2016(contains R1,R2,R3) is used in view <2016>

My goal is to find a way to clear out data in <2015> only.

Thanks.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 2:34 pm
by declanr
nayitian wrote:Thank you all for the info above.

I manually created two views, same structures
In Perspectives/Architect Server Explorer turn on the Properties Window; navigate to the view, highlight the view but don't open it and tell us what the number is for your period dimension under the "# Elements" column.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 2:36 pm
by lotsaram
declanr wrote:In Perspectives/Architect Server Explorer turn on the Properties Window; navigate to the view, highlight the view but don't open it and tell us what the number is for your period dimension under the "# Elements" column.
Declan you're putting up a good fight but I fear our colleague may be beyond redemption.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 2:48 pm
by rmackenzie
nayitian wrote:<2015>
R1 R2 R3
L1
L2
L3
Nayitian is describing the type of view that you can configure in the cube viewer and save, slice, snapshot etc; not a view extract which is what TI uses to process a cube view when it is a data source to the process. View extracts are subtly different because all the dimensions are on rows.

You might want to configure the view within the TI: set the data source as cube view; hit browse; select a cube; select create view; define the selections in there. Then you'll be using a view extract and not the sort of view that has rows and columns etc. If you select a single year in the view extract dialog then this will point you in the right direction.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 8:24 pm
by nayitian
lotsaram wrote:
declanr wrote:In Perspectives/Architect Server Explorer turn on the Properties Window; navigate to the view, highlight the view but don't open it and tell us what the number is for your period dimension under the "# Elements" column.
Declan you're putting up a good fight but I fear our colleague may be beyond redemption.
Thank you so very much. But really, you don't need to fear. I am seeking for smarter people's help to improve the knowledge, not looking for savior.

Back to the question, two same structred views created manually through Architect, execept the title element, I suppose all other attributes are the same, including the #Elements.

Re: ViewZeroOut()

Posted: Mon Nov 10, 2014 10:21 pm
by declanr
nayitian wrote:
lotsaram wrote:
declanr wrote:In Perspectives/Architect Server Explorer turn on the Properties Window; navigate to the view, highlight the view but don't open it and tell us what the number is for your period dimension under the "# Elements" column.
Declan you're putting up a good fight but I fear our colleague may be beyond redemption.
Thank you so very much. But really, you don't need to fear. I am seeking for smarter people's help to improve the knowledge, not looking for savior.

Back to the question, two same structred views created manually through Architect, execept the title element, I suppose all other attributes are the same, including the #Elements.
As per my first reply and Robin's reply the issue is that the viewzeroout uses the view as it appears to TM1 not as it appears to you.

If you do what i suggested in the most recent post I expect you will see that your view has more than 1 element in that dimension, despite you seeing just one.

Create a subset with just 1 element in and select that in your view rather than just selecting the element from the dimension.

Re: ViewZeroOut()

Posted: Wed Nov 12, 2014 3:04 pm
by nayitian
Thank you Declan. I have got what I wanted. No more being puzzled... :)
Thanks all.