Create elements based on a cubeview

Post Reply
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Create elements based on a cubeview

Post by Rtel »

I am writing a TI to add a new element from a data source (a cube view)

CUBE Name – CubeA
DIMENSION –
1) Counter (1,2,3,4,5…)
2) ElementDetails ( DimName, Element, ParentElement, ChildElement, Attr1_Name, Att1_Value, …AttrN_Name, AttN_Value)

When I passed view of a view of CubeA as data source, I get only one element of ElementDetails dimension as a data source and in next pass of Metadata I get next element detail.
For eg
First pass – I get DimName
Second pass – I get EL_Name
Third pass – I get EL_Parent_Name

But I need all the elements details in one pass of metadata. so that I can create that element in right location and also add value to all of its attributes.

Please advise

Thanks


sample of ASCIIOUTPUT from metadata

"Dimension", "Account","10-04-27","9:20"
"ParentElement", "123","10-04-27","9:20"
"Element", "123.1","10-04-27","9:20"
"ChildElement", "123.11","10-04-27","9:20"
"Att1_name", "Att1","10-04-27","9:20"
"Att1_Value", "1","10-04-27","9:20"
"Att2_name", "Att2","10-04-27","9:20"
"Att2_Value", "2","10-04-27","9:20"
"Model", "MyModel","10-04-27","9:20"
"Dimension", "Account","10-04-27","9:20"
"ParentElement", "345","10-04-27","9:20"
"Element", "345.1","10-04-27","9:20"
"ChildElement", "345.11","10-04-27","9:20"
"Att1_name", "Att1","10-04-27","9:20"
"Att1_Value", "12","10-04-27","9:20"
"Att2_name", "Att2","10-04-27","9:20"
"Att2_Value", "22","10-04-27","9:20"
"Model", "MyModel","10-04-27","9:20"
"Dimension", "Account_Oracle","10-04-27","9:20"
"ParentElement", "678","10-04-27","9:20"
"Element", "678.1","10-04-27","9:20"
"ChildElement", "678.11","10-04-27","9:20"
"Att1_name", "Att1","10-04-27","9:20"
"Att1_Value", "33","10-04-27","9:20"
"Att2_name", "Att2","10-04-27","9:20"
"Att2_Value", "44","10-04-27","9:20"
"Model", "MyModel","10-04-27","9:20"
User avatar
Steve Rowe
Site Admin
Posts: 2417
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Create elements based on a cubeview

Post by Steve Rowe »

You need to limit your datasource to just the element name and then use CellGetS to ElementDetails to lookup the other values you are after.

i.e. Row 1 of your DS
"Dimension", "Account","10-04-27"
sParentElement= CellGetS ( 'ElementDetails' , vDimension , vAccount ,'ParentElement');

I think...it's not clear from your post what the dimensionality of "ElementDetails" is.
Technical Director
www.infocat.co.uk
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Create elements based on a cubeview

Post by tomok »

When a cube view is used as a data source you get one record (line) for every intersection in the view. That's why you get separate records for DimName, Element, Parent, etc. Like Steve mentioned, if you want all of these to be in the same record you have to set up your view to pull just one of them and in your Metadata tab you add additional CellGetS formulas to pull all the remaining elements in the ElementDetails dimension. This is quite common and is the strategy to use when you want to pull all the months of the year from a cube and have them all on the same line.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply