Tm1 REST api - filter all subset except one dynamic subset

Post Reply
kavitha2002
Posts: 93
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 » Tue Sep 11, 2018 8:30 am

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: 1825
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0
Excel Version: 2016
Location: Brussels, Belgium
Contact:

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

Post by Wim Gielis » Tue Sep 11, 2018 10:40 am

There is a filter with 'Starts with' option that you can use, to exclude the subsets that start with ...
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 105 TM1 articles and a lot of custom code
Newest blog article: Looping over input files

kavitha2002
Posts: 93
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 » Tue Sep 11, 2018 11:40 am

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
Community Contributor
Posts: 551
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1, SSAS
Version: 9.5 - 10.2
Excel Version: 97 - 2013
Contact:

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

Post by macsir » Tue Sep 11, 2018 10:34 pm

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
Posts: 93
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 » Wed Sep 12, 2018 8:16 pm

It worked well. Thanks a lot. :)

Post Reply