Anyone seen the equivalent of DimSiz for Hierarchies?
HierarchySize or HierarchySiz doesn't compile and I can't see any other likely candidates.
Anyone spotted the function?
HierarchySize Function
- Steve Rowe
- Site Admin
- Posts: 2415
- 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
HierarchySize Function
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- MVP
- Posts: 264
- Joined: Mon Nov 03, 2014 8:23 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2 PA2
- Excel Version: 2016
Re: HierarchySize Function
Have you tried passing 'DImensionName:HierarchyName' into DimSiz?
-
- Posts: 62
- Joined: Mon Aug 15, 2016 8:48 am
- OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
- Version: 10.2.0 FP3
- Excel Version: Excel 2013
- Location: Hamburg, DE, EU
- Contact:
Re: HierarchySize Function
In the PA docs there are many functions supporting the new hierarchy feature, maybe this could do the job?
As far as there is a subset ALL in place for the regraded hierarchy...
Code: Select all
HierarchySubsetGetSize(DimName, HierName, SubsetName);
-----------------------------------
Best regards,
Stefan
Best regards,
Stefan
-
- Site Admin
- Posts: 1453
- Joined: Wed May 28, 2008 9:09 am
Re: HierarchySize Function
Digging in somewhat it turns out that DIMSIZ is a rules function (which can be used in TI like almost all of them) - clue is that it is short and cryptic.
This can be done with Marius Wirtz' TM1py libraries:
(Updated 25/08 - no need for an explicit loop)
This can be done with Marius Wirtz' TM1py libraries:
Code: Select all
from TM1py.Services import TM1Service
with TM1Service(address='', port=8045, user='', password='', ssl=True) as tm1:
dim_name = 'SDK.Geography'
dimension = tm1.dimensions.get(dimension_name=dim_name)
# iterate through hierarchies
for hierarchy in dimension:
print(hierarchy.name, len(hierarchy))
- Steve Rowe
- Site Admin
- Posts: 2415
- 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: HierarchySize Function
Thanks Brain, I can confirm that DimSiz ('DImensionName:HierarchyName' ) returns the correct information...
Technical Director
www.infocat.co.uk
www.infocat.co.uk