How to dynamically refer to cube view in TI?

Post Reply
Ashleigh W
Posts: 88
Joined: Mon Oct 24, 2016 1:21 pm
OLAP Product: TM1
Version: TM1 Perspectives 10
Excel Version: Excel 2016

How to dynamically refer to cube view in TI?

Post by Ashleigh W »

Hi experts, is there a way to dynamically refer to cube view in TI without setting reference to specific cube and view in 'Data Source'?
I have a TI which need to run on top on multiple cubes. Same TI - Multiple cubes with only 1 dimension difference and I do not want to replicate multiple TIs.

Thanks for your help in advance.
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: How to dynamically refer to cube view in TI?

Post by declanr »

DataSourceNameForServer = <CubeName>;
DataSourceCubeView = <ViewName>;

On the prolog tab.
You need to make sure the view that you originally set it up with has at least the same number of columns etc in order to be able to use the variables.
Declan Rodger
Ashleigh W
Posts: 88
Joined: Mon Oct 24, 2016 1:21 pm
OLAP Product: TM1
Version: TM1 Perspectives 10
Excel Version: Excel 2016

Re: How to dynamically refer to cube view in TI?

Post by Ashleigh W »

Thank you for quick response.

does it matter where I place DataSourceNameForServer?
I currently set it at the Prolog bottom
Emixam
Posts: 139
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: PA 2.0.x
Excel Version: 2016
Location: The Internet

Re: How to dynamically refer to cube view in TI?

Post by Emixam »

Ashleigh W wrote: Thu Apr 22, 2021 4:03 pm does it matter where I place DataSourceNameForServer?
No, as long as it's in the Prolog.
Ashleigh W
Posts: 88
Joined: Mon Oct 24, 2016 1:21 pm
OLAP Product: TM1
Version: TM1 Perspectives 10
Excel Version: Excel 2016

Re: How to dynamically refer to cube view in TI?

Post by Ashleigh W »

Thank you so much!
lotsaram
MVP
Posts: 3652
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 dynamically refer to cube view in TI?

Post by lotsaram »

If you want to look at some worked examples of dynamically setting cubes and views as datasources just look at the bedrock library. For example bedrock.cube.data.export
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply