How to use PublishSubset() Function

Post Reply
VPKR
Posts: 19
Joined: Thu Jul 12, 2012 4:34 pm
OLAP Product: IBM Cognos TM1
Version: 10.2.2.4
Excel Version: 2010

How to use PublishSubset() Function

Post by VPKR »

Hello
I have a requirement where i need to publish a private subset for public access. Since it is not supported through TI process, I need to do it through excel macros.
Can anyone please share me a simple macro to achieve this?

Thanks
declanr
MVP
Posts: 1828
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: How to use PublishSubset() Function

Post by declanr »

The easiest way to do this is just stick the private subset in a private view. Then use the PublishView TI function to publish the view along with the correct flag to also publish the private subsets.
Declan Rodger
Vijji
Posts: 1
Joined: Thu Jun 26, 2014 12:05 am
OLAP Product: IBM Cognos TM1
Version: TM1 9.5.2 10.1 10.2
Excel Version: MS Office 2010

Re: How to use PublishSubset() Function

Post by Vijji »

Hello guys,

I was going through this post and referred to TM1 Reference Guide and then came across the following:

PublishView function cannot publish a private view that uses private subsets. All private subsets in a private view must first be published with the PublishSubset macro function.
Link: http://publib.boulder.ibm.com/infocente ... ubset.html

PS: Sorry, I haven't come up with a solution (I am new to TM1) but an observation :)
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: How to use PublishSubset() Function

Post by BariAbdul »

Hi vijji,This might be relevant to you:
http://www.tm1forum.com/viewtopic.php?f=3&t=4544 Thanks
"You Never Fail Until You Stop Trying......"
declanr
MVP
Posts: 1828
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: How to use PublishSubset() Function

Post by declanr »

Vijji wrote:Hello guys,

I was going through this post and referred to TM1 Reference Guide and then came across the following:

PublishView function cannot publish a private view that uses private subsets. All private subsets in a private view must first be published with the PublishSubset macro function.
Link: http://publib.boulder.ibm.com/infocente ... ubset.html

PS: Sorry, I haven't come up with a solution (I am new to TM1) but an observation :)
You are looking at the macro functions, I was talking about the TI function of the same name.
Declan Rodger
lotsaram
MVP
Posts: 3701
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to use PublishSubset() Function

Post by lotsaram »

VPKR wrote:Hello
I have a requirement where i need to publish a private subset for public access. Since it is not supported through TI process, I need to do it through excel macros.
Can anyone please share me a simple macro to achieve this?

Thanks
TM1 reference guide wrote: PublishSubset
This is a TM1 macro function, valid only in Excel macros and VBA modules.
This function publishes a named private subset on a server.

If you attempt to publish a private subset for which an identically named public subset exists, you will be prompted to overwrite the existing public subset.

Syntax
PublishSubset(dimension, subset)

dimension
The server-prefixed name of the dimension containing the private subset you want to publish. For example, to publish a subset of the Region dimension on the Finance server, you would pass "Finance:Region" as the dimension argument.

subset
The name of the private subset you want to publish.
As in ....

Code: Select all

Application.Run "PublishSubset" "cxmd:Product" "Top10 SKUs"
What more do you need?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Wim Gielis
MVP
Posts: 3229
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: How to use PublishSubset() Function

Post by Wim Gielis »

lotsaram wrote:As in ....

Code: Select all

Application.Run "PublishSubset" "cxmd:Product" "Top10 SKUs"
What more do you need?
Well, maybe some comma's would be helpful :-)

Code: Select all

Application.Run "PublishSubset", "cxmd:Product", "Top10 SKUs"
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
VPKR
Posts: 19
Joined: Thu Jul 12, 2012 4:34 pm
OLAP Product: IBM Cognos TM1
Version: 10.2.2.4
Excel Version: 2010

Re: How to use PublishSubset() Function

Post by VPKR »

Hi Lotsaram and Wim Gielis, thanks much for your help.
I created a private subset and i can even able to publish it with my user ID with admin access ( using the template i build using the macro button).

I still need experts assistence in below things:
1) I could not publish any private subset created by other users or even other non-admin users could not publish their private subsets.
2) Another puzzle i have is TM1 allows multiple users to create a private subset with the same name. In this case how does system know which user's private subset to be published?

Your help in this will be highly appreciated.
Wim Gielis
MVP
Posts: 3229
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: How to use PublishSubset() Function

Post by Wim Gielis »

VPKR wrote:Hi Lotsaram and Wim Gielis, thanks much for your help.
I created a private subset and i can even able to publish it with my user ID with admin access ( using the template i build using the macro button).

I still need experts assistence in below things:
1) I could not publish any private subset created by other users or even other non-admin users could not publish their private subsets.
2) Another puzzle i have is TM1 allows multiple users to create a private subset with the same name. In this case how does system know which user's private subset to be published?

Your help in this will be highly appreciated.
1) You need Admin access, as specified by Alan: http://www.tm1forum.com/viewtopic.php?p=23252
2) Each user has its own folder for private objects in the TM1 data directory. Did you have a look over there?
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
Post Reply