Tracing views that are using specific subsets

Post Reply
mecheng
Posts: 7
Joined: Fri Jun 15, 2012 8:34 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Tracing views that are using specific subsets

Post by mecheng »

Hi,
I have an implementation with a large number of cubes in TM1.
in some TI processes, i'm dynamically creating/deleting views and subsets. I run into an error saying "unable to delete subset because it may be used in a view". I know what this means but its very cumbersome to go through the masses of cubes and views to find the view that's using the specific subset.

is there a setting or function or technique in TM1 that i can use to figure out exactly which view is using the subset of interest? some sort of trace?

Thanks,

Mecheng
User avatar
jim wood
Site Admin
Posts: 3951
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: Tracing views that are using specific subsets

Post by jim wood »

One thing to keep in mind. Many of us have seen caching issues with views like this. I've seen on many occasions a subset that can't be deleted without being a member of any view,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
declanr
MVP
Posts: 1815
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: Tracing views that are using specific subsets

Post by declanr »

mecheng wrote:Hi,
I have an implementation with a large number of cubes in TM1.
in some TI processes, i'm dynamically creating/deleting views and subsets. I run into an error saying "unable to delete subset because it may be used in a view". I know what this means but its very cumbersome to go through the masses of cubes and views to find the view that's using the specific subset.

is there a setting or function or technique in TM1 that i can use to figure out exactly which view is using the subset of interest? some sort of trace?

Thanks,

Mecheng

Mecheng,

If you mean that you create the view and subset in the prolog of your TI and then delete it in the epilog of the TI, it can be a good idea to start the TI with a simple:

Code: Select all

sProcessName = <Process_Name>

And then make your view and subsets all equal sProcessName, that way you can guarantee they wont be used anywhere else.
Declan Rodger
jstrygner
MVP
Posts: 195
Joined: Wed Jul 22, 2009 10:35 pm
OLAP Product: TM1
Version: 9.5.2 FP3
Excel Version: 2010

Re: Tracing views that are using specific subsets

Post by jstrygner »

mecheng wrote: is there a setting or function or technique in TM1 that i can use to figure out exactly which view is using the subset of interest? some sort of trace?
Hi mecheng, I think this you could find helpful.
mecheng
Posts: 7
Joined: Fri Jun 15, 2012 8:34 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: Tracing views that are using specific subsets

Post by mecheng »

Hi Everyone. Thanks for your replies. This has been very helpful!
mecheng
Posts: 7
Joined: Fri Jun 15, 2012 8:34 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: Tracing views that are using specific subsets

Post by mecheng »

jstrygner wrote:
mecheng wrote: is there a setting or function or technique in TM1 that i can use to figure out exactly which view is using the subset of interest? some sort of trace?
Hi mecheng, I think this you could find helpful.

Thank you jstrygner! this really helped solve my issues.
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Tracing views that are using specific subsets

Post by Wim Gielis »

declanr wrote:Mecheng,

If you mean that you create the view and subset in the prolog of your TI and then delete it in the epilog of the TI, it can be a good idea to start the TI with a simple:

Code: Select all

sProcessName = <Process_Name>
And then make your view and subsets all equal sProcessName, that way you can guarantee they wont be used anywhere else.
Actually, TM1 has a built-in function for that:

Code: Select all

sProcessName = GetProcessName;
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
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: Tracing views that are using specific subsets

Post by EvgenyT »

I also find it useful to have a While loop in epilog to go through each dimension in the cube to destroy subsets, that way you are sure not to miss one in your code...
Post Reply