Page 1 of 1

How to Save MDX based Subset for Clone Dimension

Posted: Thu Jul 11, 2019 7:55 pm
by dharav9
Hi, All

We created a clone dimension and now we have to create same subset in to clone dimension as source dimension has. The "Default" subset is based on MDX. I went in to data directory and searched for Source}subs and copy Default.sub file. Now i went to Source_Clone}subs folder and i paste Default.sub file. Moreover, i open .sub file in to text editor and replace Source with Source_Clone name. I re-started the server. I did see the default subset for source_clone dimension but it does not have any elements inside because, The MDX statement cut last 6 characters as i include "_Clone".

Can anyone let me know the best practice to copy the MDX based subset from the source dimension to Source_Clone dimension?

Thank You
Dharav

Re: How to Save MDX based Subset for Clone Dimension

Posted: Thu Jul 11, 2019 8:21 pm
by declanr
Have a TI process loop through the subsets in the source dimension. For each subset use the MDXGet functionality; if it returns something then use scan/substring to replace the dim name references (1 subset might reference it multiple times) then create subset in the target with a createbymdx.
If there was no MDX just loop the elements and add to a static subset in the target.

Re: How to Save MDX based Subset for Clone Dimension

Posted: Thu Jul 11, 2019 10:23 pm
by Emixam
Hi,

I suggest you to take a look at this previous thread :

https://www.tm1forum.com/viewtopic.php?t=12582

Enjoy !

Re: How to Save MDX based Subset for Clone Dimension

Posted: Fri Jul 12, 2019 3:35 pm
by dharav9
@declanr and @Emixam : Thank You guys for quick turn around. It works.

I have to bring private subset as well from Data Folder=> AD => User Profile. How the logic would work here?

I created a folder called Source_Clone}Sub inside their AD Profile and paste the private subset from Source}Sub folder. I also open the .sub file in the Source_Clone}sub folder and edited the dimension name Source to Source_Clone. Restarted services. It seems, it doesn't work.

For public subset creation, i am good now.

Thank You for your time and effort to provide the logic.

Dharav