Subset Elements in EXCEL Sheet. - Newbie in TM1

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Subset Elements in EXCEL Sheet. - Newbie in TM1

Post by bunchukokoy »

Good Day guys!

I want to ask something. I hope you can help me on this. I want to know how will I display all elements of a particular subset to an Excel Sheet.

Thanks!

bunchukokoy :)
Alan Kirk
Site Admin
Posts: 6643
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: Subset Elements in EXCEL Sheet. - Newbie in TM1

Post by Alan Kirk »

bunchukokoy wrote: I want to ask something. I hope you can help me on this. I want to know how will I display all elements of a particular subset to an Excel Sheet.
Depends on what your intention is, but a couple of ways:

Option 1: In Excel go to the TM1 menu -> Pick -> Element... -> This will launch the Subset Editor. Select the subset that you want, then select all of its elements -> OK -> Double click on the cell that you want them to be stored in -> Select whether you want them listed vertically or horizontally.

Option 2: Use SubNM formulas in an Excel spreadsheet. For example you could put the following in a cell in row 1:

Code: Select all

=SUBNM("Server:Dimension","SubsetName",ROW())
and copy it down for as many rows as the subset has members. If you don't know the exact number, just copy it down as far as you can; if the row number exceeds the number of members in the subset the formula will simply return an empty string.
"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.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: Subset Elements in EXCEL Sheet. - Newbie in TM1

Post by bunchukokoy »

Thanks Alan!

An additional information for me. Thanks!

:D
cramejia_09
Posts: 7
Joined: Tue Oct 06, 2009 3:32 am
OLAP Product: IBM COGNOS TM1
Version: 9.4
Excel Version: 2007

Re: Subset Elements in EXCEL Sheet. - Newbie in TM1

Post by cramejia_09 »

For me, my idea is to use the vba macro of Excel to list down all the elements of a dimension in an excel sheet.

1.First, get the no. of elements or size of a particular dimension that you want to use.
Dim x as long
x = Application.Run("DIMSIZ" ...etc
2.Second, use DIMNM to get the elements in a dimension. Use the size of the dimension to loop the elements in a dimension.
3. Then assign the elements that you will get from DIMNM to the cells in your worksheet.
Dim ctr as long

For ctr = 0 to x
Sheet1.Range("A"& ctr+1).value = Application.Run("DIMNM",dimension name,ctr)
Next ctr
4. Put this procedure inside the button as a trigger.
Note: please correct my vba codes if theres an error in terms of DIMNM and DIMSIZ syntax..


Thanks and Regards,
JR
lotsaram
MVP
Posts: 3698
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Subset Elements in EXCEL Sheet. - Newbie in TM1

Post by lotsaram »

cramejia_09 wrote:For me, my idea is to use the vba macro of Excel to list down all the elements of a dimension in an excel sheet.

1.First, get the no. of elements or size of a particular dimension that you want to use.
Dim x as long
x = Application.Run("DIMSIZ" ...etc
2.Second, use DIMNM to get the elements in a dimension. Use the size of the dimension to loop the elements in a dimension.
If this is all you want to do it would be more efficient to programatically fill down the dimnm formula the number of rows specified by dimsiz then run tm1recalc1 macro. It would probably be faster too.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: Subset Elements in EXCEL Sheet. - Newbie in TM1

Post by bunchukokoy »

Guys,

Thanks for your help. I really appreciate it.

bunchukokoy :D
Post Reply