Hi Everyone,
How to get to know the number of levels in Dimension and filter the dimension elements using Level using Tm1 REST api?
Is there any option to do??
Tm1 Rest api: get number of levels in Dimension
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
-
- MVP
- Posts: 3116
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Tm1 Rest api: get number of levels in Dimension
For instance:
Code: Select all
{{protocol}}://{{serverName}}:{{httpPortNumber}}/api/v1/Dimensions('TEST_DIM')/Hierarchies?$select=Name&$expand=Levels/$count
Best regards,
Wim Gielis
IBM Champion 2024
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
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
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
Re: Tm1 Rest api: get number of levels in Dimension
Super Wim Gielis.. Thanks for your immediate response.
Is there a way to filter the Dimension elements based on the level. For example,
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [DimName] )}, 1)} in mdx do we have similar in RESTapi?
Is there a way to filter the Dimension elements based on the level. For example,
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [DimName] )}, 1)} in mdx do we have similar in RESTapi?
-
- Community Contributor
- Posts: 180
- Joined: Sat May 05, 2018 11:48 am
- OLAP Product: tm1
- Version: 10.3.10100.8
- Excel Version: 14
Re: Tm1 Rest api: get number of levels in Dimension
I have found the solution to filter the dimension elements by level, hope the below Tm1 REST api query may help someone.
Code: Select all
http://host:8001/api/v1/Dimensions('DimName')/Hierarchies?$select=Name&$expand=Elements($select=Name,Type,Attributes,Level;$filter=Level eq 7)