Page 1 of 1
How to use PublishSubset() Function
Posted: Mon Aug 18, 2014 8:13 pm
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
Re: How to use PublishSubset() Function
Posted: Mon Aug 18, 2014 8:40 pm
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.
Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 1:59 am
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

Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 6:16 am
by BariAbdul
Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 6:17 am
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.
Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 6:36 am
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?
Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 8:54 am
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"
Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 1:24 pm
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.
Re: How to use PublishSubset() Function
Posted: Tue Aug 19, 2014 3:56 pm
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?