Add New Row

Post Reply
tiger1974
Posts: 7
Joined: Sun Mar 27, 2011 11:33 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Add New Row

Post by tiger1974 »

Hi,

I have users that will need to add a new row to a cube via Excel based on selected dimension elements. I know this is not a feature of TM1, but is there a workaround to be able to do this? (via TI Process somehow?)
eg.
Current Cube:
Year, Month, Category, Measure
2012,09,"blue",60
2012,10,"blue",60
2012,11,"red",60
2012,12,"yellow",60

New Row:
2012,09,"purple",60

Thanks in advance
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Add New Row

Post by Alan Kirk »

tiger1974 wrote: I have users that will need to add a new row to a cube via Excel based on selected dimension elements. I know this is not a feature of TM1, but is there a workaround to be able to do this? (via TI Process somehow?)
eg.
Current Cube:
Year, Month, Category, Measure
2012,09,"blue",60
2012,10,"blue",60
2012,11,"red",60
2012,12,"yellow",60

New Row:
2012,09,"purple",60
The only reason that it's not a feature of TM1 is that TM1 is not a relational database and therefore does not have "rows", even though it can export data in that format.

In the example above if "purple" is already an element of the category dimension then all the user needs to do is write to that combination using a DBS or DBRW formula. Nothing needs to be added.

If it's not then you need to add the element, though to be honest you really need to be absolutely sure you know what you're doing when giving users the ability to add elements to a dimension. It would be very easy to get a lot of garbage elements that way.

If you are sure that that's what you want to do, look at the TI function DimensionElementInsert in the Reference Guide, and look up "Action Button" to show you how to give the users a way to launch the process and pass the new category name as a parameter.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
tiger1974
Posts: 7
Joined: Sun Mar 27, 2011 11:33 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: Add New Row

Post by tiger1974 »

Thanks for the speedy reply Alan. The actual cube has 7 dimensions, the elements are all predefined but doesnt contain every permutation of those elements. The "add row" would only allow from existing elements. Would definately be looking at DimensionElementInsert, thanks again for pointing me in the right direction!
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Add New Row

Post by Alan Kirk »

tiger1974 wrote:Thanks for the speedy reply Alan. The actual cube has 7 dimensions, the elements are all predefined but doesnt contain every permutation of those elements. The "add row" would only allow from existing elements. Would definately be looking at DimensionElementInsert, thanks again for pointing me in the right direction!
Noooo, nooo, hang on, you haven't read what I've written. I said that you only needed to use that function if the category element didn't already exist. However you're saying that it does.

In a multidimensional cube, you don't need to have every permutation of existing elements populated. This is a concept called sparsity. When you first create a cube, it's completely sparse. All of the combinations already "exist" in the cube, they just contain no values. All you need to do is populate the ones that you want. You can populate some combinations, you can populate all combinations, but you don't need to define anything before you populate any specific combination. As I said, if you create a DBRW formula which points to the "purple" element, then as long as all of the elements are at N level that value will be stored straight away.

It's the same way as when you use a multi-sheet Excel workbook. If you want to punch a value into Sheet2, cell A5 you don't need to create that; the sheet, row and column (all of which correspond to dimension elements in a cube) already exist. All you need to do is type the number in.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
tiger1974
Posts: 7
Joined: Sun Mar 27, 2011 11:33 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

Re: Add New Row

Post by tiger1974 »

got it! :)
Post Reply