Guys,
Is there a way to remove a specific element from within a subset. I found a command to remove an element depending on it's index but I haven't found a command to find the elements position within the subset to pass to the SubsetElementDelete command. Has anybody found a quick and easy way to find an elements subset position?
Thanks,
Jim.
PS. I am avoiding using MDX by the way as using a dynamic subset slows down the extract we are trying to create.
Remove Element from a Subset
- jim wood
- Site Admin
- Posts: 3961
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Remove Element from a Subset
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Remove Element from a Subset
You would be referring to the SubIx function... which as Martin in particular has pointed out many times over the years to deaf ears in the IBM development teams, does not exist and is a glaring omission from the toolset. Given that it's not something that would be featured in a glossy sales presentation and does not involve the creation of new icons, I wouldn't count on seeing it any time soon.jim wood wrote: Is there a way to remove a specific element from within a subset. I found a command to remove an element depending on it's index but I haven't found a command to find the elements position within the subset to pass to the SubsetElementDelete command. Has anybody found a quick and easy way to find an elements subset position?
AFAIK the only way is to iterate through the subset until you find the element concerned.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
- jim wood
- Site Admin
- Posts: 3961
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Remove Element from a Subset
After posting I found another post along similar lines with a link to some process code for doing just that. Not having SubIx isn't something that I have had a problem with until now, but hey ho. As you said in your original reply to the other post I may need to add exception functionality to the generic process I created,
Jim.
Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: Remove Element from a Subset
While we're on the subject of SubIx, when an item appears multiple times in the subset which index should the function return?
Or should it be a "search" operation starting at a particular index
and that way you could iterate through them.
Also as the function would not be available in rules (as rules have no idea of the existence of subsets and views) should it have a more TIish name? SubsetFindElementIndex perhaps?
Or should it be a "search" operation starting at a particular index
Code: Select all
SubIx( 'dimension', 'subset', 'element', starting_index )
Also as the function would not be available in rules (as rules have no idea of the existence of subsets and views) should it have a more TIish name? SubsetFindElementIndex perhaps?
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Remove Element from a Subset
Good points, and good ideas. No, it definitely shouldn't be available in rules, despite the occasional person wanting to create subset-driven rules. (That way liesDuncan P wrote:While we're on the subject of SubIx, when an item appears multiple times in the subset which index should the function return?
Or should it be a "search" operation starting at a particular index
and that way you could iterate through them.Code: Select all
SubIx( 'dimension', 'subset', 'element', starting_index )
Also as the function would not be available in rules (as rules have no idea of the existence of subsets and views) should it have a more TIish name? SubsetFindElementIndex perhaps?

"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.