Page 1 of 1
How to dynamically refer to cube view in TI?
Posted: Thu Apr 22, 2021 3:02 pm
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.
Re: How to dynamically refer to cube view in TI?
Posted: Thu Apr 22, 2021 3:19 pm
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.
Re: How to dynamically refer to cube view in TI?
Posted: Thu Apr 22, 2021 4:03 pm
by Ashleigh W
Thank you for quick response.
does it matter where I place DataSourceNameForServer?
I currently set it at the Prolog bottom
Re: How to dynamically refer to cube view in TI?
Posted: Thu Apr 22, 2021 4:31 pm
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.
Re: How to dynamically refer to cube view in TI?
Posted: Thu Apr 22, 2021 4:34 pm
by Ashleigh W
Thank you so much!
Re: How to dynamically refer to cube view in TI?
Posted: Thu Apr 22, 2021 5:37 pm
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