ViewZeroOut()

Post Reply
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

ViewZeroOut()

Post 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.
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: ViewZeroOut()

Post 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.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: ViewZeroOut()

Post 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.
Declan Rodger
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: ViewZeroOut()

Post 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.
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: ViewZeroOut()

Post 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.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: ViewZeroOut()

Post 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.
Declan Rodger
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: ViewZeroOut()

Post 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.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: ViewZeroOut()

Post 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.
Robin Mackenzie
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: ViewZeroOut()

Post 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.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: ViewZeroOut()

Post 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.
Declan Rodger
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: ViewZeroOut()

Post by nayitian »

Thank you Declan. I have got what I wanted. No more being puzzled... :)
Thanks all.
Post Reply