Hi, I am new to this forum, and not a TM1 developer. I am using version 10.2.2 of TM1 and Excel 2013. I am working on a metadata management project and need to gather the specific structure information from TM1 cubes. I am trying to gather for each cube in a given instance the name of the cube, the name of each dimension on the cube, and the name of each measure on the cube(if any). I am not interested in any of the actual data loaded in the cube, just the structure of the cube.
My technical TM1 teammates are not aware of a way to do this. They can get the cube and its dimensions, but not the measures for some reason. I would appreciate any thoughts or suggestions on how to accomplish this.
Thanks!
Structure details for a cube
-
- MVP
- Posts: 2836
- 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: Structure details for a cube
This is probably because a "Measures" dimension is not required in a TM1 cube. It is perfectly acceptable not to have one even if that goes against best practice. For instance, you could have a GL cube with the dimensions Version, Time, Center, and Account. There are no measures. Best practice would have you add such a dimension and have a single element called "Amount" but you don't have to.repoman wrote:They can get the cube and its dimensions, but not the measures for some reason.
So, unfortunately, you'll have to analyze each cube manually and figure out if it has a measures dimension and it it does, what those individual measures are in that cube. I don't know of an automated tool that is intelligent enough to handle that.
-
- MVP
- Posts: 3240
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Structure details for a cube
Hi,tomok wrote:This is probably because a "Measures" dimension is not required in a TM1 cube. It is perfectly acceptable not to have one even if that goes against best practice. For instance, you could have a GL cube with the dimensions Version, Time, Center, and Account. There are no measures. Best practice would have you add such a dimension and have a single element called "Amount" but you don't have to.repoman wrote:They can get the cube and its dimensions, but not the measures for some reason.
So, unfortunately, you'll have to analyze each cube manually and figure out if it has a measures dimension and it it does, what those individual measures are in that cube. I don't know of an automated tool that is intelligent enough to handle that.
As this information is / could be stored in the cube }CubeProperties, a few loops
(over cubes, then over dimensions to see if the stored }MEASURES_DIMENSION entry belongs to the cube, then over the elements in that dimension) will do.
Use Tabdim to read out the dimension name in a cube at a certain position, use AsciiOutput to export the measures dimension elements to a text file, and that's it.
Of course, and that's what Tom is probably referring to, if the MEASURES_DIMENSION is not filled in, it's different.
You could assume the last dimension in the cube. In either case this could be some manual work of first filling in the MEASURES_DIMENSION element and then executing your routine.
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- MVP
- Posts: 3240
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Structure details for a cube
Here's coding taken from one of my generic TI processes:
Code: Select all
# Loop over cubes. Verify cube logging and set the measures dimension
c = 1;
While( c <= Dimsiz( '}Cubes' ));
vCube = Dimnm( '}Cubes', c );
########################
# CUBE LOGGING
########################
If( CellGetS( '}CubeProperties', vCube, 'LOGGING' ) @<> '' &
CellGetS( '}CubeProperties', vCube, 'LOGGING' ) @<> 'YES' );
AsciiOutput( GetProcessErrorFileDirectory | 'UNLOGGED CUBES.txt', vCube );
EndIf;
########################
# MEASURES DIMENSION
########################
nDimCount = 2;
While( TabDim( vCube, nDimCount + 1 ) @<> '' );
nDimCount = nDimCount + 1;
End;
vMeasuresDim = Tabdim( vCube, nDimCount );
If( CellGetS( '}CubeProperties', vCube, 'MEASURES_DIMENSION' ) @<> vMeasuresDim );
CellPutS( vMeasuresDim, '}CubeProperties', vCube, 'MEASURES_DIMENSION' );
EndIf;
c = c + 1;
End;
CubeSaveData( '}CubeProperties' );
Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- MVP
- Posts: 2836
- 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: Structure details for a cube
The problem I was referring to is the fact that having a measures dimension is completely optional and even if you do, populating this attribute in the }CubeProperties cube is also optional. If either of these conditions are false then there is no automated way to get at what the OP wants. I have seen a lot of TM1 systems in my day and only a very few where both these conditions were true. YMMV.Wim Gielis wrote:As this information is / could be stored in the cube }CubeProperties, a few loops
(over cubes, then over dimensions to see if the stored }MEASURES_DIMENSION entry belongs to the cube, then over the elements in that dimension) will do.
Use Tabdim to read out the dimension name in a cube at a certain position, use AsciiOutput to export the measures dimension elements to a text file, and that's it.
Of course, and that's what Tom is probably referring to, if the MEASURES_DIMENSION is not filled in, it's different.
You could assume the last dimension in the cube. In either case this could be some manual work of first filling in the MEASURES_DIMENSION element and then executing your routine.
-
- MVP
- Posts: 3240
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.1.5
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Structure details for a cube
Indeed, then I wrote down correctly what you meant Tom 

Best regards,
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
- gtonkin
- MVP
- Posts: 1265
- Joined: Thu May 06, 2010 3:03 pm
- OLAP Product: TM1
- Version: Latest and greatest
- Excel Version: Office 365 64-bit
- Location: JHB, South Africa
- Contact:
Re: Structure details for a cube
In a similar manner to what Wim has suggested to detail the various object, I use Excel to read various system cubes through Active Forms, SubNMs, TabDims etc. to build a reasonable overview of a model.
I have attached a portion of this for you to aid you in listing the cubes, and dimensions and then the overlay of which cubes use which dimensions.
Start by updating the server name on the R-Reference sheet, recalculate the workbook and see if this gets you closer to your goal.
You can then add sheets to read from the other control cubes as required.
As a general rule, I always make the last dimension in my cube the Measures dimension as often times you require string measures and these can only be accommodated by having them in the last dimension - said differently, you may want to make an assumption that the last dimension in a cube is the measures BUT confirm this based on the elements and content.
I have attached a portion of this for you to aid you in listing the cubes, and dimensions and then the overlay of which cubes use which dimensions.
Start by updating the server name on the R-Reference sheet, recalculate the workbook and see if this gets you closer to your goal.
You can then add sheets to read from the other control cubes as required.
As a general rule, I always make the last dimension in my cube the Measures dimension as often times you require string measures and these can only be accommodated by having them in the last dimension - said differently, you may want to make an assumption that the last dimension in a cube is the measures BUT confirm this based on the elements and content.
- Attachments
-
- Cubes_And_Dimensions.xlsx
- (475.45 KiB) Downloaded 190 times
-
- Posts: 2
- Joined: Tue Dec 13, 2016 8:58 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: office 2013 v15
Re: Structure details for a cube
Thanks all for the valuable input on my question. Much appreciated, - Happy Holidays!