Tm1 REST api - filter all subset except one dynamic subset

Post Reply
kavitha2002
Community Contributor
Posts: 180
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Tm1 REST api - filter all subset except one dynamic subset

Post by kavitha2002 »

Hello everyone,

Is it possible to filter all the subsets from dimension except one subet.

DIM
- subset1
- subset2
- excludesubset_username #It a dynamic subset, Username will be created dynamically.

Code: Select all

http://host:8001/api/v1/Dimensions('DIMName')/Hierarchies('DIMname')/Subsets?$filter=Name ne 'excludeSubset__User1'
above wil exclude subset when I give with full subset name.

but i want something like,

Code: Select all

http://host:8001/api/v1/Dimensions('DIMName')/Hierarchies('DIMname')/Subsets?$filter=Name ne 'excludeSubset__*'
because username will be appended dynamically.

Kindly post ur suggestion.
Wim Gielis
MVP
Posts: 3103
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 - filter all subset except one dynamic subset

Post by Wim Gielis »

There is a filter with 'Starts with' option that you can use, to exclude the subsets that start with ...
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
kavitha2002
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 - filter all subset except one dynamic subset

Post by kavitha2002 »

Thanks for your reply..

Ya I too agree startswith() works, but the scenario is I have to exclude one subset and retrieve all other subset in dimension uisng rest api.

My exceptation: Return all subsets except the one startswith("exclude_")
User avatar
macsir
MVP
Posts: 782
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: Tm1 REST api - filter all subset except one dynamic subset

Post by macsir »

you could put "not" in front of startswith function or use contains function instead. Looks like $search has not been implemented in TM1 rest api now.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
kavitha2002
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 - filter all subset except one dynamic subset

Post by kavitha2002 »

It worked well. Thanks a lot. :)
Post Reply